Skip to content

Restrict static params of our types, so e.g. PolyRing{T} now always must satisfy T<:RingElement#2286

Open
fingolfin wants to merge 1 commit intomasterfrom
mh/restrict-static-params
Open

Restrict static params of our types, so e.g. PolyRing{T} now always must satisfy T<:RingElement#2286
fingolfin wants to merge 1 commit intomasterfrom
mh/restrict-static-params

Conversation

@fingolfin
Copy link
Copy Markdown
Member

This gives a lot of extra hints to JET and also Julia itself.

It should also help to catch certain human errors. And it also gives developers a hint what those type params are (I certainly struggled with that when I started out).

But I am sure this also will break some code (and perhaps even uncover a bug here or there), or it might even turn out to be infeasible after all.

The idea came to me during some debugging last night and I thought I'd give it a quick try...

@codecov
Copy link
Copy Markdown

codecov Bot commented Jan 10, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.15%. Comparing base (e271241) to head (7c6ee86).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #2286      +/-   ##
==========================================
+ Coverage   88.12%   88.15%   +0.03%     
==========================================
  Files         126      126              
  Lines       32108    32108              
==========================================
+ Hits        28294    28305      +11     
+ Misses       3814     3803      -11     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread src/MPoly.jl Outdated
@lgoettgens
Copy link
Copy Markdown
Member

Is this "breaking" as in it actually breaks some of our code, or is it just "theoretically breaking"? Or do we need to wait for working downstream tests to see that?

@fingolfin
Copy link
Copy Markdown
Member Author

It should not be breaking in practice. But we know how it is ... I'd not be surprised if some code out there is broken. So I really would like to wait till the upstream tests are restored.

@fingolfin fingolfin force-pushed the mh/restrict-static-params branch from 1804060 to ebdb890 Compare January 26, 2026 02:04
@fingolfin fingolfin marked this pull request as ready for review January 26, 2026 02:04
@lgoettgens
Copy link
Copy Markdown
Member

Downstream tests seem unhappy, but it is not immediately clear to me why

@lgoettgens
Copy link
Copy Markdown
Member

Downstream tests seem unhappy, but it is not immediately clear to me why

The current error seems to be due to a typo in a signature in Oscar, which will be fixed by oscar-system/Oscar.jl#5724. Let's re-run CI again once that is in to see if it breaks anything more.

But nonetheless, the "breaking" label should now stay, even if with future patches to Oscar the CI becomes green.

@lgoettgens lgoettgens closed this Jan 27, 2026
@lgoettgens lgoettgens reopened this Jan 27, 2026
@lgoettgens lgoettgens closed this Jan 28, 2026
@lgoettgens lgoettgens reopened this Jan 28, 2026
@lgoettgens lgoettgens closed this Feb 2, 2026
@lgoettgens lgoettgens reopened this Feb 2, 2026
@fingolfin fingolfin changed the title Restrict static params of our types Restrict static params of our types, so e.g. PolyRing{T} now always must satisfy T<:RingElement Feb 3, 2026
@fingolfin fingolfin added release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes triage labels Feb 3, 2026
Comment thread src/MPoly.jl Outdated
This gives a lot of extra hints to JET and also Julia itself.
@fingolfin fingolfin force-pushed the mh/restrict-static-params branch from ebdb890 to 7c6ee86 Compare February 13, 2026 16:26
Copy link
Copy Markdown
Member

@lgoettgens lgoettgens left a comment

Choose a reason for hiding this comment

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

good to go in the next breaking release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking release notes: use title For PRs: the title of this PR is suitable for direct use in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants