truffle icon indicating copy to clipboard operation
truffle copied to clipboard

Native loading strategy to support TRUFFLE_NATIVE_SOLC_PATH

Open hellwolf opened this issue 2 years ago • 7 comments

PR description

Related to https://github.com/trufflesuite/truffle/issues/4490

Todo

  • [ ] Add tests to verify nativePath resolves correctly, including in rangeUtils
  • [ ] clean up @cds-amal's contribution.

Testing instructions

Truffle compile to support the usage of process environment TRUFFLE_NATIVE_SOLC_PATH when compilers.solc.version is "native".

Documentation

  • [ ] I thought about documentation and added the doc-change-required label to this PR if documentation updates are required.

Breaking changes and new features

  • [ ] I have added any needed breaking-change and new-feature labels for the appropriate packages.

hellwolf avatar Apr 25 '23 08:04 hellwolf

This would also be benefiting from https://github.com/trufflesuite/truffle/pull/6008

hellwolf avatar Apr 26 '23 12:04 hellwolf

Btw, this isn't actually a breaking change, right? It's marked as one, but I don't see how it would be...

haltman-at avatar Apr 27 '23 04:04 haltman-at

Btw, this isn't actually a breaking change, right? It's marked as one, but I don't see how it would be...

not breaking change.

hellwolf avatar Apr 27 '23 17:04 hellwolf

@hellwolf , @cameel : If you were able to specify solc's fullpath for native executable as below, would you still need to override the command line?

  // ...
  compilers {
    solc: {
      // ...
      version: "native",
      nativePath: "/tmp/solc-linux-amd64-v0.8.10+commit.fc410830"
      // ...
    }
  }

cds-amal avatar May 01 '23 21:05 cds-amal

@hellwolf , @cameel : If you were able to specify solc's fullpath for native executable as below, would you still need to override the command line?

  // ...
  compilers {
    solc: {
      // ...
      version: "native",
      nativePath: "/tmp/solc-linux-amd64-v0.8.10+commit.fc410830"
      // ...
    }
  }

That could be a nice option!

hellwolf avatar May 01 '23 22:05 hellwolf

If you were able to specify solc's fullpath for native executable as below, would you still need to override the command line?

We wouldn't. That would work just as well as an env var for us.

cameel avatar May 07 '23 19:05 cameel

@hellwolf, this is what I had in mind. @gnidan might have opinions on this, and of course we should add tests.

thank you, happy to test it out and report here after this is make available in a future release.

hellwolf avatar May 14 '23 14:05 hellwolf