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

medusaup #352

Closed
aviggiano opened this issue Apr 19, 2024 · 3 comments
Closed

medusaup #352

aviggiano opened this issue Apr 19, 2024 · 3 comments

Comments

@aviggiano
Copy link

As a beta tester, I would like to always use the latest version of medusa.

It would be nice to have a medusaup command similar to foundryup so that it can compile from the master branch

@0xalpharush
Copy link
Contributor

This is a duplicate of #205

What is the blocker on #224 @anishnaik ?

@aviggiano
Copy link
Author

I'll close this one

If anyone wants a quick fix, here's what I'm doing:

function medusaup()
{
        pushd . &>>/dev/null
        cd <YOUR_MEDUSA_GIT_REPOSITORY_PATH>
        git pull
        echo "Building medusa $(git rev-parse --short HEAD)"
        go build
        mv medusa /usr/local/bin
        popd &>>/dev/null
}

@Xenomega
Copy link
Member

Xenomega commented Apr 19, 2024

@0xalpharush As a side note, we'll also be fixing go get (so you can use the normal Go flow to pull the tool).

We can't use go get now because we use a replaces directive in medusa-geth, and go get does not respect replaces directives unless it's at the top level (e.g. medusa, if that's what you're 'getting', rather than medusa-geth, a dependency).

This is only a problem because we tried to maintain the original github.com/ethereum/go-ethereum module path in medusa-geth, and use a replaces directive to redirect it. We thought this would be nice, but caught on to the replaces directive caveat later and never revisited it.

The fix will look like this:

  • All future forks of medusa-geth will simply apply our patchset as normal, and we'll just have one additional step: another commit we'll make atop all other changes, where we'll refactor all instances of github.com/ethereum/go-ethereum to github.com/crytic/medusa-geth.
  • A one-time update made to medusa after we update medusa-geth, simply updating all imported module paths to the new ones.

That will let us use go get and will be required for some other planned features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants