Skip to content

Remove unneded feature flags in tests#4295

Open
MKowalski8 wants to merge 5 commits intomasterfrom
mkowalski/remove-unused-features-flags
Open

Remove unneded feature flags in tests#4295
MKowalski8 wants to merge 5 commits intomasterfrom
mkowalski/remove-unused-features-flags

Conversation

@MKowalski8
Copy link
Copy Markdown
Contributor

@MKowalski8 MKowalski8 commented Apr 20, 2026

Towards #4091

Introduced changes

  • Delete unneded feature flags and unify oracles tests in normal e2e

Checklist

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

@MKowalski8 MKowalski8 changed the title Delete unneded feature flags in tests Remove unneded feature flags in tests Apr 20, 2026
Comment thread .github/workflows/scheduled.yml Outdated
@MKowalski8 MKowalski8 force-pushed the mkowalski/remove-unused-features-flags branch 2 times, most recently from f3cdc77 to c0cf5b3 Compare April 22, 2026 20:43
@MKowalski8 MKowalski8 changed the base branch from master to mkowalski/bump-scarb-to-2.18.0 April 22, 2026 20:44
Comment thread crates/forge/Cargo.toml Outdated
Copy link
Copy Markdown
Contributor

@piotmag769 piotmag769 left a comment

Choose a reason for hiding this comment

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

Also one general note, isn't this pattern #[cfg_attr(not(feature = "some_feature"), ignore)] a bit convoluted?
I would do #[cfg(feature = "some_feature")] and get the same result - unless you really need the info about ignored test in cargo test output

@MKowalski8 MKowalski8 force-pushed the mkowalski/bump-scarb-to-2.18.0 branch from e495d8f to a1a6f70 Compare April 23, 2026 09:44
Base automatically changed from mkowalski/bump-scarb-to-2.18.0 to master April 23, 2026 11:00
@MKowalski8 MKowalski8 force-pushed the mkowalski/remove-unused-features-flags branch from c0cf5b3 to 374bd8c Compare April 23, 2026 12:04
@MKowalski8 MKowalski8 force-pushed the mkowalski/remove-unused-features-flags branch 3 times, most recently from 4a0f5c7 to 96c30bb Compare April 27, 2026 11:00
Comment thread .github/workflows/ci.yml
- name: Run snap E2E tests
run: cargo test --profile ci -p forge --test main snap_

test-plugin-checks:
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Since the plugin is already covered by the e2e tests and the test_for_multiple_scarb_versions flag appeared to be a redundant leftover, I merged the special condition tests into a single job.
We can think of moving it only to scheduled tests. But for example mayby it's good to know as fast as possible if the backward compatibility with snforge new is broken.


#[test]
#[cfg_attr(
feature = "skip_test_for_only_latest_scarb",
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Those tests pass without it. So imo there is no reason to keep it. If something brake in the future we can just simply add it back.

@MKowalski8 MKowalski8 force-pushed the mkowalski/remove-unused-features-flags branch from 04be695 to 9acb1c2 Compare April 27, 2026 12:11
@MKowalski8 MKowalski8 marked this pull request as ready for review April 27, 2026 12:58
@MKowalski8 MKowalski8 requested review from a team, DelevoXDG and franciszekjob April 27, 2026 12:58
@MKowalski8 MKowalski8 force-pushed the mkowalski/remove-unused-features-flags branch from 9acb1c2 to 82adec9 Compare April 27, 2026 17:25
@MKowalski8 MKowalski8 force-pushed the mkowalski/remove-unused-features-flags branch from 82adec9 to 9450510 Compare April 28, 2026 14:22
Comment thread .github/workflows/ci.yml
echo "features=$FEATURES" >> "$GITHUB_OUTPUT"
- name: Build and archive tests
run: cargo nextest archive --cargo-profile ci -p forge --features "${{ steps.test_features.outputs.features }}" --archive-file 'nextest-archive-forge-native-${{ runner.os }}.tar.zst'
run: cargo nextest archive --cargo-profile ci -p forge --features "cairo-native" --archive-file 'nextest-archive-forge-native-${{ runner.os }}.tar.zst'
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

nit:

Suggested change
run: cargo nextest archive --cargo-profile ci -p forge --features "cairo-native" --archive-file 'nextest-archive-forge-native-${{ runner.os }}.tar.zst'
run: cargo nextest archive --cargo-profile ci -p forge --features cairo-native --archive-file 'nextest-archive-forge-native-${{ runner.os }}.tar.zst'

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.

4 participants