Skip to content

feat: unstable with traits#354

Merged
KyrylR merged 4 commits into
BlockstreamResearch:masterfrom
Sdoba16:feature/unstable-with-traits
Jun 25, 2026
Merged

feat: unstable with traits#354
KyrylR merged 4 commits into
BlockstreamResearch:masterfrom
Sdoba16:feature/unstable-with-traits

Conversation

@Sdoba16

@Sdoba16 Sdoba16 commented Jun 10, 2026

Copy link
Copy Markdown
Collaborator

Closes #317

Replaces #329

Added UnstableFeature enum to track available unstable features
Added UnstableFeatures to check whether a feature is enabled

Added RequireFeature trait, implemented for every AST node. Each node reports which unstable features it requires. Struct impls use full field destructuring and enum impls use exhaustive matches, so new nodes or fields cause a compile error until the impl is updated.

The check runs at parse time: once a program parses without errors, any use of a disabled feature is reported with an error naming the feature and the -Z flag that enables it.

Added a -Z <feature> flag to the CLI. Multiple features can be passed with repeated flags. Available features are listed in the help output.

simc program.simf -Z imports

Added doc/unstable-features.md with user and developer guides.

@Sdoba16 Sdoba16 requested a review from LesterEvSe June 10, 2026 20:51
@Sdoba16 Sdoba16 self-assigned this Jun 10, 2026
@Sdoba16 Sdoba16 changed the title Feature/unstable with traits feat:unstable with traits Jun 10, 2026
@Sdoba16 Sdoba16 changed the title feat:unstable with traits feat: unstable with traits Jun 10, 2026
Comment thread src/unstable.rs Outdated
Comment thread src/driver/mod.rs Outdated
Comment thread doc/unstable-features.md Outdated
Comment thread doc/unstable-features.md Outdated
@Sdoba16 Sdoba16 force-pushed the feature/unstable-with-traits branch 3 times, most recently from af5f7dc to 2ddec75 Compare June 22, 2026 18:37
@Sdoba16 Sdoba16 marked this pull request as ready for review June 22, 2026 18:38
@Sdoba16 Sdoba16 requested a review from delta1 as a code owner June 22, 2026 18:38
@Sdoba16 Sdoba16 requested a review from LesterEvSe June 22, 2026 18:40
Comment thread src/unstable.rs Outdated
Comment thread src/unstable.rs Outdated
Comment thread src/unstable.rs Outdated
Comment thread src/parse.rs
@Sdoba16 Sdoba16 force-pushed the feature/unstable-with-traits branch from 2ddec75 to dbe633b Compare June 23, 2026 10:37
@Sdoba16 Sdoba16 requested a review from LesterEvSe June 23, 2026 10:44

@LesterEvSe LesterEvSe left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ACK dbe633b; tested locally

@LesterEvSe LesterEvSe force-pushed the feature/unstable-with-traits branch 4 times, most recently from 3cf3675 to 16b3674 Compare June 24, 2026 15:21
@LesterEvSe

Copy link
Copy Markdown
Collaborator

Note that once this PR is merged, we will need to update Simplex to support the new unstable features.

@LesterEvSe LesterEvSe force-pushed the feature/unstable-with-traits branch from 16b3674 to 131cc53 Compare June 25, 2026 13:23
@apoelstra

Copy link
Copy Markdown
Contributor

131cc53 needs rebase

@LesterEvSe LesterEvSe force-pushed the feature/unstable-with-traits branch 2 times, most recently from f2429cc to 1a06f35 Compare June 25, 2026 13:50
@LesterEvSe LesterEvSe force-pushed the feature/unstable-with-traits branch from 1a06f35 to b8d2b34 Compare June 25, 2026 14:03

@KyrylR KyrylR left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

ACK b8d2b34; successfully ran local tests

@KyrylR KyrylR merged commit 9e77379 into BlockstreamResearch:master Jun 25, 2026
12 checks passed
LesterEvSe added a commit that referenced this pull request Jun 26, 2026
66d20b5 remove leftover commented code from `lib.rs` (LesterEvSe)

Pull request description:

  This PR removes commented-out code blocks in `lib.rs` that were inadvertently left behind during the unstable features merge #354

ACKs for top commit:
  KyrylR:
    utACK 66d20b5

Tree-SHA512: 9ccf7ce25b3d9a0749942b0f5bc0c64237dc5f0a9aad2cfa279488ddfae8439691164db5a94bab5af8e00ddb269e274020608efb34d78c8ccabe7eb047b2538b
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.

Implement a flag for unstable features

4 participants