You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 26, 2024. It is now read-only.
[x ] I've asked for help in the Truffle Gitter before filing this issue.
Issue
The built json files in /build/contracts contain source maps. The identifiers which source file has which index are not explicitly given, thus making it much less useful to work with for building tools that want to make use of the truffle.
Steps to Reproduce
truffle unbox metacoin in an empty folder
truffle compile (possibly remove the truffle.js file on Windows before)
observe that the .json files in the folder build/contracts contain the source maps but there's no source list given (as solc returns) nor any other explicit mention which source file is which identifier.
Expected Behavior
Output the source list such that the source mappings can be used.
Actual Results
The source list or an explicit mention of the source file identifiers are not given
Environment
Operating System: Windows 10
Ethereum client: - (non necessary)
Truffle version (truffle version): v4.1.14
node version (node --version): v8.11.1
npm version (npm --version): v6.4.0
Possible solutions
This could possibly be done as a separate file for example in the build/ folder, but this might be an issue if partial compilations can create overlaps with the identifiers. In which case for example the following could work:
Each compilation adds an identifier to all contract json files built in that run.
Each contract json file contains the identifier of it's own source file.
This is under the assumption that compilation of a contract will always compile also all dependencies and that would then allow us to resolve which source mapping uses which compilation identifier and thus which source list and the source list would contain all relevant source files.
The relevant identifiers are returned by the solc output json to truffle here (as far as I can tell) and should thus be relatively easy to add to the built files. The updatedAt could be possibly used somewhat as an identifier for which compilation run it is, but it wouldn't be a nice solution as compilatin runs would have to be identified by comparing similar times.
The text was updated successfully, but these errors were encountered:
Issue
The built json files in /build/contracts contain source maps. The identifiers which source file has which index are not explicitly given, thus making it much less useful to work with for building tools that want to make use of the truffle.
Steps to Reproduce
Expected Behavior
Output the source list such that the source mappings can be used.
Actual Results
The source list or an explicit mention of the source file identifiers are not given
Environment
truffle version
): v4.1.14node --version
): v8.11.1npm --version
): v6.4.0Possible solutions
This could possibly be done as a separate file for example in the build/ folder, but this might be an issue if partial compilations can create overlaps with the identifiers. In which case for example the following could work:
This is under the assumption that compilation of a contract will always compile also all dependencies and that would then allow us to resolve which source mapping uses which compilation identifier and thus which source list and the source list would contain all relevant source files.
The relevant identifiers are returned by the solc output json to truffle here (as far as I can tell) and should thus be relatively easy to add to the built files. The updatedAt could be possibly used somewhat as an identifier for which compilation run it is, but it wouldn't be a nice solution as compilatin runs would have to be identified by comparing similar times.
The text was updated successfully, but these errors were encountered: