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

fix: remove 'assert_eq!' test_mode checks #7016

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

enitrat
Copy link
Contributor

@enitrat enitrat commented Jan 7, 2025

Following our discussion

@reviewable-StarkWare
Copy link

This change is Reviewable

Copy link
Collaborator

@orizi orizi left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @enitrat)


a discussion (no related file):
tagging @mkaput and @maciektr to validate that we are indeed only adding this plugin in tests - unless very specifically added.

Copy link
Member

@mkaput mkaput left a comment

Choose a reason for hiding this comment

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

Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @maciektr, @mkaput, and @orizi)


a discussion (no related file):

Previously, orizi wrote…

tagging @mkaput and @maciektr to validate that we are indeed only adding this plugin in tests - unless very specifically added.

Until #6843 is merged and correctly integrated into the ecosystem, we still suffer from the transient nature of compiler plugins, i.e. snforge_std pulls assert macros, so all Foundry project have these macros available everywhere.

@maciektr
Copy link
Collaborator

maciektr commented Jan 7, 2025

Previously, mkaput (Marek Kaput) wrote…

Until #6843 is merged and correctly integrated into the ecosystem, we still suffer from the transient nature of compiler plugins, i.e. snforge_std pulls assert macros, so all Foundry project have these macros available everywhere.

If guarding on test target being present is too limiting, we should guard on target: 'starknet-contract' instead, and disallow compilation if this is enabled. This way we can use assert_eq outside of tests and still disallow using it in contracts.

@maciektr
Copy link
Collaborator

maciektr commented Jan 7, 2025

we are indeed only adding this plugin in tests

We are not adding it, users add it themselves explicitly, like this: https://github.com/OpenZeppelin/cairo-contracts/blob/39950b704feb356389c979c11d987d957409d0dc/packages/token/Scarb.toml#L32-L33

Copy link
Member

@mkaput mkaput left a comment

Choose a reason for hiding this comment

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

Reviewed 1 of 1 files at r1, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @orizi)

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.

5 participants