Closed LefterisJP closed 7 years ago
Please also see the discussion in https://github.com/ethpm/epm and the related gitter channel.
@LefterisJP it may make sense moving this to browser-solidity given it has a config file now and is an IDE.
It's fine by me. I just want us to establish some kind of standard for project configuration so that we can have all IDEs follow it and be able to provide info for things such as remapping so that compilation works.
I would like to move that into the scope of the ethpm project.
Introduction
I would like to propose a convention for the existence of a project local config file for solidity projects. The config file should be in the root project directory where
solc
should be called from and should have a standard recognizeable name. For example.solidity
or.solc
.The Problem
The problem this proposal tries to solve is how third party developer tools like say editor plugins/modules handle solidity development. I take the EMACS solidity-mode as an example here.
The plugin performs on the fly compilation of solidity and highlights errors on your sourcecode. The problem is that it has no way to know what compilation arguments you are using with solc and as such if you use the remappings feature then the on the fly compilation will always fail at the import and this functionality of the plugin becomes useless.
The solution
Add a
.solidity
file in the root of the project and there provide all such configuration variables that would be needed by the compiler for each individual project..solidity
How?
For now the only use case I can see is the above, and only for the remappings argument. Perhaps there are others, but quite certainly there will be need for per-project configuration in the future. My suggestion on how to proceed ahead from here is to ask other developer's opinions and see if they like this approach.
If yes then we can all start including it in our solidity projects and tool developers can start expecting and parsing this file to have their tools become project aware.