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

Compiler downloader #402

Merged
merged 45 commits into from
Sep 14, 2023
Merged

Compiler downloader #402

merged 45 commits into from
Sep 14, 2023

Conversation

Nathan-SL
Copy link
Contributor

@Nathan-SL Nathan-SL commented Jul 19, 2023

Usage related changes

  • Closes Replace dockerized cairo compiler by relying on prebuilt GitHub binaries #398
  • If the user specifies a custom cairo1BinDir, this is used. If the compilerVersion is specified in the hardhat config file, this is used. These two options cannot be specified at the same time (there is a runtime check). If the user doesn't specify any, the last compiler version compatible with the plugin is used.
  • If the user specifies a compilerVersion and it is not present, we download it for the user and store it in ~/.starknet-hardhat-plugin. If already present here (and executable), we use that.

Development related changes

  • Removed condition (and indentation) in setup-compiler.sh
  • Extract common testing functionality by introducing assertCompilationArtifactsExist
  • In starknet-wrapper.ts, the compilation functions are moved to the abstract parent class (StarknetWrapper)
    • The usefulness of starknet wrapper keeps on decreasing.

Checklist:

  • Formatted the code
  • No linter errors + tried to avoid introducing linter warnings
  • Performed a self-review of the code
  • Rebased to the last commit of the target branch (or merged it into my branch)
  • Documented the changes
  • Updated the test directory (with a test case consisting of network.json, hardhat.config.ts, check.ts)
  • Linked issues which this PR resolves
  • Created a PR (Wont affect this PR) to the plugin branch of starknet-hardhat-example:Compiler downloader starknet-hardhat-example#120
  • All tests are passing (for external contributors who don't have access to the CI/CD pipeline)

@Nathan-SL Nathan-SL marked this pull request as ready for review July 21, 2023 12:06
@Nathan-SL Nathan-SL requested a review from FabijanC July 21, 2023 12:19
Copy link
Collaborator

@FabijanC FabijanC left a comment

Choose a reason for hiding this comment

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

Does it work for compiling files outside of the repo? Was this case supported with older compiler?

src/cairo1-compiler.ts Outdated Show resolved Hide resolved
src/cairo1-compiler.ts Outdated Show resolved Hide resolved
src/cairo1-compiler.ts Outdated Show resolved Hide resolved
src/cairo1-compiler.ts Outdated Show resolved Hide resolved
src/cairo1-compiler.ts Outdated Show resolved Hide resolved
src/cairo1-compiler.ts Outdated Show resolved Hide resolved
src/task-actions.ts Outdated Show resolved Hide resolved
src/cairo1-compiler.ts Outdated Show resolved Hide resolved
src/cairo1-compiler.ts Outdated Show resolved Hide resolved
src/task-actions.ts Outdated Show resolved Hide resolved
www/docs/intro.md Outdated Show resolved Hide resolved
@Nathan-SL Nathan-SL requested a review from FabijanC August 1, 2023 17:46
Copy link
Collaborator

@FabijanC FabijanC left a comment

Choose a reason for hiding this comment

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

Needs conflict resolution. There are still three unresolved conversations, I marked the others as resolved.

src/cairo1-compiler.ts Outdated Show resolved Hide resolved
src/cairo1-compiler.ts Outdated Show resolved Hide resolved
@FabijanC FabijanC requested a review from penovicp September 13, 2023 11:07
Copy link
Collaborator

@FabijanC FabijanC left a comment

Choose a reason for hiding this comment

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

Approving to make GitHub stop indicating that changes are requested. Assigning another reviewer.

@FabijanC FabijanC merged commit 6c12294 into master Sep 14, 2023
@FabijanC FabijanC deleted the compiler-downloader branch September 14, 2023 08:08
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.

Replace dockerized cairo compiler by relying on prebuilt GitHub binaries
3 participants