Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(solc): rewrite compiler passes and cache change detection #802

Merged
merged 96 commits into from
Feb 4, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
96 commits
Select commit Hold shift + click to select a range
3f17eea
chore: clippy
mattsse Jan 17, 2022
abbc25d
Merge branch 'master' into matt/more-refactor
mattsse Jan 17, 2022
d624d32
refactor: rewrite compiler passes and cache
mattsse Jan 17, 2022
3026275
Merge branch 'master' into matt/more-refactor
mattsse Jan 22, 2022
8e16080
feat: more work on compile pipeline
mattsse Jan 24, 2022
c6c75d3
feat: add cache constructor
mattsse Jan 24, 2022
0ae4f1a
add artifact filtering
mattsse Jan 24, 2022
c7a6646
fine tune api
mattsse Jan 24, 2022
1346bb9
feat: prepare version integration
mattsse Jan 24, 2022
c5a9323
docs: more docs
mattsse Jan 24, 2022
68bfa4d
Merge branch 'master' into matt/more-refactor
mattsse Jan 26, 2022
3ec7a61
feat: add cacheentry2
mattsse Jan 26, 2022
c7d75dc
replace cacheentry types
mattsse Jan 26, 2022
c52dbe7
integrate new api
mattsse Jan 26, 2022
af560ca
Merge branch 'master' into matt/more-refactor
mattsse Jan 27, 2022
20ca411
docs: more docs
mattsse Jan 27, 2022
117b66c
feat: implement new output handler
mattsse Jan 27, 2022
0f33e57
feat: integrate cached files in new compile pipeline
mattsse Jan 27, 2022
6c6b5e1
refactor: more cache refactor
mattsse Jan 27, 2022
d5810f3
docs: more docs
mattsse Jan 27, 2022
35ee608
Merge branch 'master' into matt/more-refactor
mattsse Jan 27, 2022
ad82ba6
feat: add source name mapping
mattsse Jan 27, 2022
e26ede9
feat: implement new parallel solc
mattsse Jan 27, 2022
270a60b
refactor: do a little cleanup
mattsse Jan 27, 2022
5053823
refactor: even more cleanup
mattsse Jan 27, 2022
514a329
even more cleanup
mattsse Jan 27, 2022
c4d6883
chore: make it compile
mattsse Jan 27, 2022
dba9dbc
chore: make it compile with all features
mattsse Jan 27, 2022
dda718a
chore: clippy fix
mattsse Jan 27, 2022
77644b9
feat: integrate new compiler pipeline
mattsse Jan 27, 2022
741f9ee
docs: more docs
mattsse Jan 27, 2022
587a8c3
refactor: move stuff around
mattsse Jan 28, 2022
17a2829
refactor: start deprecating output type
mattsse Jan 28, 2022
fe57fec
Merge branch 'master' into matt/more-refactor
mattsse Jan 28, 2022
850497f
chore: make it compile again
mattsse Jan 28, 2022
14e020c
chore(deps): bump solc version 0.2.0
mattsse Jan 28, 2022
e26b301
Merge branch 'master' into matt/more-refactor
mattsse Jan 29, 2022
38da027
feat: unify output types
mattsse Jan 29, 2022
3ac275c
cargo fix
mattsse Jan 29, 2022
4718eb4
refactor: add contracts wrapper
mattsse Jan 29, 2022
0e3ad21
chore: replace ProjectCompileOutput
mattsse Jan 29, 2022
15c7c52
docs: add more docs
mattsse Jan 29, 2022
da2d790
feat: add offline mode
mattsse Jan 29, 2022
d720f87
feat: more artifact helpers
mattsse Jan 29, 2022
f2913a8
chore: cleanup cache
mattsse Jan 29, 2022
b6aaef5
chore: streamline types
mattsse Jan 29, 2022
f18f97d
fix: better artifacts mapping
mattsse Jan 29, 2022
fdaeb57
chore: some cleanup
mattsse Jan 29, 2022
87dc19e
chore: change artifact
mattsse Jan 30, 2022
b320761
chore: add configure solc fn
mattsse Jan 30, 2022
3fb6ea1
feat: add artifact reading
mattsse Jan 30, 2022
1431584
feat: implement retain and extend
mattsse Jan 30, 2022
2b554b5
feat: add cache extending
mattsse Jan 30, 2022
1651d97
feat: write to disk
mattsse Jan 30, 2022
1757db9
chore: make clippy happy
mattsse Jan 30, 2022
09fa9c2
Merge branch 'master' into matt/more-refactor
mattsse Jan 30, 2022
17d1431
feat: implement path mapping
mattsse Jan 30, 2022
8ea0eac
chore: nits
mattsse Jan 30, 2022
b354f7a
feat: introduce states
mattsse Jan 30, 2022
ddc30ac
feat: add compiler state machine
mattsse Jan 30, 2022
d782fcd
chore: move cache types to cache mod
mattsse Jan 30, 2022
cb45e51
chore: make clippy happy
mattsse Jan 30, 2022
1b757a9
Merge branch 'master' into matt/more-refactor
mattsse Jan 31, 2022
7a0f8d5
feat: add debug derives
mattsse Jan 31, 2022
1332582
fix: use resolved import source unit names
mattsse Jan 31, 2022
4198a07
Merge branch 'master' into matt/more-refactor
mattsse Jan 31, 2022
0e7d08f
fix: failing tests
mattsse Jan 31, 2022
6e5a98f
test: test multiple libs properly
mattsse Jan 31, 2022
57ed568
chore: make clippy happy
mattsse Jan 31, 2022
82dabeb
chore: update CHANGELOG
mattsse Jan 31, 2022
8e1b175
fix: doc tests
mattsse Jan 31, 2022
5ed8bbb
fix: set offline mode correctly
mattsse Jan 31, 2022
df7640a
Merge branch 'master' into matt/more-refactor
mattsse Jan 31, 2022
705fa9b
chore: make it compile again
mattsse Jan 31, 2022
bf6e5f1
Update ethers-solc/src/artifacts.rs
mattsse Feb 2, 2022
49b9942
feat: find remappings by default
mattsse Jan 31, 2022
83a2f09
typos
mattsse Feb 2, 2022
0a871ae
add eth_syncing RPC (#848)
rakita Feb 1, 2022
1a26010
fix(core): adjust Ganache for new cli output (#851)
wolflo Feb 1, 2022
5fe8d5a
fix: review comments
mattsse Feb 2, 2022
f3a5f58
fix: cache relative path bug
mattsse Feb 2, 2022
1ca1173
chore: add cache example
mattsse Feb 2, 2022
e962821
Merge branch 'master' into matt/more-refactor
mattsse Feb 2, 2022
a524c7c
chore: use absolute paths
mattsse Feb 2, 2022
0fa69c2
fix: remove overwritten files from cache
mattsse Feb 2, 2022
e2d9d05
fix: rustfmt
mattsse Feb 2, 2022
ac9c3c2
Merge branch 'master' into matt/more-refactor
mattsse Feb 2, 2022
ff9599c
chore: more helper functions
mattsse Feb 3, 2022
a73fe91
chore: export AggregatedOutput
mattsse Feb 3, 2022
7b3bb57
feat: implement helper functions
mattsse Feb 3, 2022
c15b634
feat: even more helpers
mattsse Feb 3, 2022
e19103c
fix: failing doc tests
mattsse Feb 3, 2022
a03a7bb
refactor: remove source name map tracking
mattsse Feb 3, 2022
072bbb5
fix: determine artifacts in ephemeral mode
mattsse Feb 3, 2022
4367538
Merge branch 'master' into matt/more-refactor
mattsse Feb 3, 2022
18e8218
refactor: allowed paths should not fail
mattsse Feb 3, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@

### Unreleased

- Total revamp of the `Project::compile` pipeline
[#802](https://github.com/gakonst/ethers-rs/pull/802)
- Support multiple versions of compiled contracts
- Breaking: deprecate hardhat cache file compatibility, cache file now tracks artifact paths and their versions
- Fix flatten replacement target location
[#846](https://github.com/gakonst/ethers-rs/pull/846)
- Fix duplicate files during flattening
Expand Down
40 changes: 39 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ ethers-core = { version = "^0.6.0", default-features = false, path = "./ethers-c
ethers-providers = { version = "^0.6.0", default-features = false, path = "./ethers-providers" }
ethers-signers = { version = "^0.6.0", default-features = false, path = "./ethers-signers" }
ethers-middleware = { version = "^0.6.0", default-features = false, path = "./ethers-middleware" }
ethers-solc = { version = "^0.1.0", default-features = false, path = "./ethers-solc" }
ethers-solc = { version = "^0.2.0", default-features = false, path = "./ethers-solc" }
ethers-etherscan = { version = "^0.2.0", default-features = false, path = "./ethers-etherscan" }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion ethers-contract/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ ethers-contract-abigen = { version = "^0.6.0", path = "ethers-contract-abigen" }
ethers-contract-derive = { version = "^0.6.0", path = "ethers-contract-derive" }
ethers-core = { version = "^0.6.0", path = "../ethers-core", default-features = false, features = ["eip712"]}
ethers-derive-eip712 = { version = "^0.2.0", path = "../ethers-core/ethers-derive-eip712"}
ethers-solc = { version = "^0.1.0", path = "../ethers-solc", default-features = false }
ethers-solc = { version = "^0.2.0", path = "../ethers-solc", default-features = false }

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
tokio = { version = "1.5", default-features = false, features = ["macros"] }
Expand Down
2 changes: 1 addition & 1 deletion ethers-middleware/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ hex = { version = "0.4.3", default-features = false, features = ["std"] }
rand = { version = "0.8.4", default-features = false }
ethers-providers = { version = "^0.6.0", path = "../ethers-providers", default-features = false, features = ["ws", "rustls"] }
once_cell = "1.8.0"
ethers-solc = { version = "^0.1.0", path = "../ethers-solc", default-features = false }
ethers-solc = { version = "^0.2.0", path = "../ethers-solc", default-features = false }
serial_test = "0.5.1"

[target.'cfg(not(target_arch = "wasm32"))'.dev-dependencies]
Expand Down
7 changes: 5 additions & 2 deletions ethers-solc/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "ethers-solc"
version = "0.1.0"
version = "0.2.0"
authors = ["Matthias Seitz <matthias.seitz@outlook.de>", "Georgios Konstantopoulos <me@gakonst.com>"]
license = "MIT OR Apache-2.0"
edition = "2018"
Expand All @@ -17,7 +17,7 @@ keywords = ["ethereum", "web3", "solc", "solidity", "ethers"]
ethers-core = { version = "^0.6.0", path = "../ethers-core", default-features = false }
serde_json = "1.0.68"
serde = { version = "1.0.130", features = ["derive"] }
semver = "1.0.4"
semver = { version = "1.0.4", features = ["serde"] }
walkdir = "2.3.2"
tokio = { version = "1.15.0", default-features = false, features = ["process", "io-util", "fs", "time"], optional = true }
futures-util = { version = "^0.3", optional = true }
Expand Down Expand Up @@ -50,6 +50,9 @@ getrandom = { version = "0.2", features = ["js"] }

[dev-dependencies]
criterion = { version = "0.3", features = ["async_tokio"] }
env_logger = "*"
tracing-subscriber = {version = "0.3", default-features = false, features = ["env-filter", "fmt"]}
rand = "0.8.4"
pretty_assertions = "1.1.0"
tempfile = "3.3.0"
tokio = { version = "1.15.0", features = ["full"] }
Expand Down
Loading