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

Add Cairo program template #2952

Merged
merged 9 commits into from
Mar 28, 2025
Merged

Add Cairo program template #2952

merged 9 commits into from
Mar 28, 2025

Conversation

ddoktorski
Copy link
Contributor

@ddoktorski ddoktorski commented Feb 17, 2025

Closes #2841
Towards #2850

Introduced changes

  • Added a template for simple Cairo program - the same that is created by scarb new for cairo test runner
  • Renamed templates directory starknet_forge_template -> snforge_templates
  • Fixed assert_macros version set in a template

Checklist

  • Linked relevant issue
  • Updated relevant documentation
  • Added relevant tests
  • Performed self-review of the code
  • Added changes to CHANGELOG.md

@ddoktorski ddoktorski marked this pull request as ready for review February 17, 2025 19:33
@ddoktorski ddoktorski requested a review from a team as a code owner February 17, 2025 19:33
@ddoktorski ddoktorski requested review from cptartur and kkawula and removed request for a team February 17, 2025 19:33
@ddoktorski ddoktorski force-pushed the 2850-cairo-program-template branch from 0bbd4a5 to 2f2329b Compare February 25, 2025 14:33
@ddoktorski ddoktorski marked this pull request as draft February 28, 2025 16:04
Base automatically changed from 2850-move-init-tests to master February 28, 2025 16:06
@ddoktorski ddoktorski force-pushed the 2850-cairo-program-template branch from 2f2329b to 09c7caa Compare March 17, 2025 17:05
@ddoktorski ddoktorski requested a review from cptartur March 17, 2025 17:52
@ddoktorski ddoktorski marked this pull request as ready for review March 17, 2025 17:52
Copy link
Contributor

@franciszekjob franciszekjob left a comment

Choose a reason for hiding this comment

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

Let's also mention that somewhere in the forge guide.

Copy link
Member

@kkawula kkawula left a comment

Choose a reason for hiding this comment

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

snforge new fails, is it expected?

Created package.
    Removing cairo_test from dev-dependencies
error: cannot get dependencies of `[email protected]`

Caused by:
    cannot find package `assert_macros ^2.11.3`
[ERROR] Failed to fetch created project: `scarb` exited with error

@franciszekjob
Copy link
Contributor

snforge new fails, is it expected?

Created package.
    Removing cairo_test from dev-dependencies
error: cannot get dependencies of `[email protected]`

Caused by:
    cannot find package `assert_macros ^2.11.3`
[ERROR] Failed to fetch created project: `scarb` exited with error

For me it works, both on scarb 2.8.5 and 2.10.0. Which version are you using @kkawula ? Are you sure you've pulled last changes?

@ddoktorski
Copy link
Contributor Author

For me it works, both on scarb 2.8.5 and 2.10.0. Which version are you using @kkawula ? Are you sure you've pulled last changes?

It is due to setting assert macros to Scarb version instead of Cairo version, the problem occurs only for Scarb 2.11.3. Will be fixed soon.

@ddoktorski ddoktorski requested a review from kkawula March 26, 2025 17:19
@ddoktorski ddoktorski merged commit 9ac735e into master Mar 28, 2025
37 checks passed
@ddoktorski ddoktorski deleted the 2850-cairo-program-template branch March 28, 2025 12:41
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.

Add a starknet-foundry template that is not for Starknet Development
4 participants