hyperledger / solang

Solidity Compiler for Solana and Polkadot
https://solang.readthedocs.io/
Apache License 2.0
1.22k stars 207 forks source link

Vendor forge-fmt into solang repo #1649

Closed seanyoung closed 4 weeks ago

seanyoung commented 1 month ago

The published forge-fmt is out date, not maintained and depends on an old version of solang-parser.

This is a copy of forge-fmt:

https://github.com/foundry-rs/foundry/tree/master/crates/fmt

commit: 00854b602ef0e67379a2027ccc5d0aad553e5333

LucasSte commented 1 month ago

I don't know if this is much of an effort, but have you considered adding forge-fmt as a submodule or as a git subtree?

seanyoung commented 1 month ago

I don't know if this is much of an effort, but have you considered adding forge-fmt as a submodule or as a git subtree?

It needs modifications to make it work, and I don't know that that is possible with submodule or subtree.

Having said that, if it could work it would be nice.

xermicus commented 1 month ago

Yeah I quickly had the same thought as @LucasSte, however we'd have to modify it anyways and it wouldn't be just forge-fmt but the whole foundry repo.

xermicus commented 1 month ago

@seanyoung also noticed the PR title could be renamed to "Vendor forge-fmt into solang" as it would explain the reasoning of why we need this :)

seanyoung commented 4 weeks ago

The windows failure is unrelated to this PR