Closed mslinn closed 5 years ago
Very annoying. (Lots is very annoying when using SNAPSHOT dependencies in my experience on sbt.) Does the compilation eventually happen, or does it fail? (See e.g. here for Sonatype signalling an error for lack of credentials but doing the right thing anyway.)
Although in theory I have a network-hosted compiler available for your use by default, it's best before you try to compile to run
> ethSolidityInstallCompiler
So that you have a local solidity compiler available. (This will install a solidity compiler binary in the sbt-ethereum repository directory.) If you tab before you hit return, you can see the available compilers, which are out of date, but it will default to the latest available.
I don't think that's documented yet, alas. The documentation is out of date.
(sbt-ethereum is all about the tab key. Type eth
then double tab to see all the ethereum-related tasks and settings. ethSo<tab>
then double tab to see solidity-related commands. (I mean to change the names of the other tasks beginning with ethS
so that one doesn't have to type the lower-case 'o'. Basically, the long command-names are a hierarchical menu scheme: eth
selected plugin-related commands, then the next letter selects a major topic, then the next letter usually gets you to a particular command.)
In general, even without this weird looking-for-a-credential-just-to-down-load-a-SNAPSHOT issue, sbt is absurdly verbose and warn-y in its handling of SNAPSHOT releases. They generate a lot of ugly noise during development, but on actual version releases I don't depend on SNAPSHOTs and things get cleaner.
$ sbt ethSolidityInstallCompiler
[info] Loading global plugins from /home/mslinn/.sbt/0.13/plugins
[info] Loading project definition from /mnt/_/work/experiments/ethereum/sbt-ethereum/project
[info] Set current project to sbt-ethereum (in build file:/mnt/_/work/experiments/ethereum/sbt-ethereum/)
[error] Not a valid command: ethSolidityInstallCompiler
[error] Not a valid project ID: ethSolidityInstallCompiler
[error] Expected ':' (if selecting a configuration)
[error] Not a valid key: ethSolidityInstallCompiler
[error] ethSolidityInstallCompiler
Plugin commands (like ethSolidityInstallCompiler
) won't work from the plug-in project itself. You need to make a project that uses the plug-in to have access to them.
You can use sbt new swaldman/solidity-seed.g8
to generate a project that uses the plug-in. Then sbt ethSolidityInstallCompiler
will work, precisely once. (It throws an ugly Exception if you try to overwrite an existing installation. That could be handled better.)
That worked!
12:13:16.288 [MLog-Init-Reporter] INFO com.mchange.v2.log.MLog - MLog clients using slf4j logging.
[info] Set current project to my-solidity-project (in build file:/mnt/_/work/experiments/ethereum/my-solidity-project/)
2017-10-20 12:13:18.128:INFO::pool-8-thread-1: Logging initialized @43483ms to org.eclipse.jetty.util.log.StdErrLog
[info] Updating available solidity compiler set.
[info] Installing local solidity compiler into the sbt-ethereum repository. This may take a few minutes.
[info] Installed local solcJ compiler, version 0.4.10 in '/home/mslinn/.sbt-ethereum/solcJ'.
[info] Testing newly installed compiler... ok.
[info] Refreshing compiler list.
[info] Updating available solidity compiler set.
[success] Total time: 3 s, completed Oct 20, 2017 12:13:21 PM
The getting started tips you provided have been most helpful. Perhaps they should be included in the docs. BTW, the docs are probably at the point of being larger than should be contained in one README.MD
. Not sure what the best approach might be: wiki pages (the current menu item cycles back to the main github repo page), or a docs/
directory containing markdown files, or GitHub pages - which means the docs would live on a new ghpages
branch of the git repo. I'd be happy to help, just let me know what your preference is.
Documentation is a big deal. I agree, the everthing-in-one-README is a bit much.
Before the Great Abandonment a few months ago, I was working on ens-scala, as both an example sbt-ethereum project, and as a useful library in its own right. I spent a bunch of time looking at documentation engines, and ended up with a somewhat elaborate pipeline mixing tut (which I kind of love in general) and hugo, the popular go-based static site generator. The mix seemed pretty powerful, but a bit heavy and unwieldy too. I was in the middle of working on asynchronous Scala stubs when I was pulled to other things, never got to do any actual documenting. But the sketch of what I planned to work with (for that library, but with sbt-ethereum in mind as well) is embedded in ens-scala
, see build.sbt and site-pipeline.
Eventually I planned to host the docs (for ens-scala
, but also sbt-ethereum
and maybe consuela
) on stand-alone sites, but you can see an initial sketch of the ens-scala docs here.
I'd love help on documentation, whether via this elaborate scheme or something simpler.
(I think these issues are addressed in the current version. sbt-ethereum
now aggressively encourages installation of the default solidity compiler if it is not yet available.)
Not sure if I am doing this right.