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

refactor: use build artifacts from compilers in project.compiler_data [APE-1495] #1719

Closed
wants to merge 1 commit into from

Conversation

antazoey
Copy link
Member

@antazoey antazoey commented Nov 1, 2023

What I did

partially fixes #1590

How I did it

  • Creates root properties for the location and decoding of such data (this is the part that ape-solidity and ape-vyper depend on to actually accomplish the goal.
  • Refactor manifest extract (used in publishing) to rely on the build artifacts instead of making shit up
  • Test: We can actually test compiler data in core now because of this because we just create the raw JSON and test that it decoded properly. In the soon-coming PRs for ape-solidity and ape-vyper, there will be more end-to-end testing because they are responsible for creating such data and we can see that both it'll be created and show up in the extracted manifest correctly

How to verify it

Checklist

  • All changes are completed
  • New test cases have been added
  • Documentation has been updated

@vany365 vany365 changed the title refactor: use build artifacts from compilers in project.compiler_data refactor: use build artifacts from compilers in project.compiler_data [APE-1495] Nov 1, 2023
@antazoey antazoey marked this pull request as draft November 1, 2023 20:53
@@ -111,6 +111,23 @@ solidity = compilers.get_compiler("solidity", settings=settings["solidity"])
vyper.compile([Path("path/to/contract.sol")])
```

### Settings Artifacts

Compiler build artifacts can be found in the the `<project>/.build/compilers.json` file.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually, not sure if this location makes sense, because the Compiler object in the manifest is not expected to be a link to another file.

can probably just be stored directly in the <project>/.build/__local__.json file

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I though we were going to keep everything separate so people to be choosier about the files they need to host and stuff? Didn't we chat about that recently on GitHub somewhere?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suppose the contract types being separate is probably ok enough for now.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm realizing this is a much bigger refactor ... Dependencies heavily rely on the compiler data already and messing with local.json is giving me a chicken and egg problem right now. Closing for now.

@antazoey antazoey closed this Nov 1, 2023
@antazoey antazoey deleted the feat/compiler-settings-out branch December 6, 2023 15:42
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

Successfully merging this pull request may close these issues.

raw AST is missing from output (only shows ape-adjusted AST)
2 participants