[WIP] medusa-geth module path refactor #584
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR closes #205 (and addresses a bullet point in #218).
A primer on the current/previous state:
go.mod
allows you to specify areplaces
directive to redirect one package path to another.medusa
used this to redirectgarden.eu.org/ethereum/go-ethereum
paths togarden.eu.org/crytic/medusa-geth
.medusa-geth
updates just involved forking and applying our patches on top, then re-linking medusa to the new version.replaces
directive only works on the top-level projects, so any attempt to usemedusa
as a dependency will not include thereplaces
directive and will breakmedusa
's ability to be imported. This same problem is also whygo install
will not work (asreplaces
is not respected).TLDR: We were prone to golang/go#44840 .
This new PR updates this by:
medusa-geth
.medusa-geth
in themedusa
project.replaces
directive with a proper import togarden.eu.org/crytic/medusa-geth
.The implications are:
go-ethereum
will now have two changes to their process: (1) a refactor commit doing a replace-all of any instances ofgarden.eu.org/ethereum/go-ethereum
togarden.eu.org/crytic/medusa-geth
should be done after our patch set is applied and all is finalized, (2) the patch set we carry forward should not include the final refactoring commit (from step 1), as the imported files will likely change all the time.Outstanding TODOs on my end before I ask for a PR review:
medusa-geth
to reflect this.Currently, you can test this with
go install -v github.com/crytic/medusa@refactormod
. Once it is merged,go install -v github.com/crytic/medusa@latest
should work