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 17731 - Regression, F# 9 compiler cannot find constructor for attribute #17746

Merged
merged 3 commits into from
Sep 16, 2024

Conversation

KevinRansom
Copy link
Member

Fix #17731

This fixes the issue: Regression, F# 9 compiler cannot find constructor for attribute.

The issue was caused by the introduction of the Attribute usage validation code.

First the validation does a pass with validation reporting disabled, it does this because:

        // 'Check' the attributes. We return the results to avoid having to re-check them in all other phases. 
        // Allow failure of constructor resolution because Vals for members in the same recursive group are not yet available

Then it does more validation, however, this time around it turns on validation reporting so that it can be notified of attribute use errors. Unfortunately the Vals for members in the same recursive group are still not available since it's only a few lines of code later.

The fix is to perform validation reporting with the constructor validation disabled.

This is okay, because the F# 8.0 code which has worked forever, just never did the pass with validation reporting enabled.

@KevinRansom KevinRansom requested a review from a team as a code owner September 16, 2024 08:04
@KevinRansom KevinRansom marked this pull request as draft September 16, 2024 08:04
@KevinRansom KevinRansom self-assigned this Sep 16, 2024
Copy link
Contributor

github-actions bot commented Sep 16, 2024

⚠️ Release notes required, but author opted out

Warning

Author opted out of release notes, check is disabled for this pull request.
cc @dotnet/fsharp-team-msft

@KevinRansom KevinRansom added the NO_RELEASE_NOTES Label for pull requests which signals, that user opted-out of providing release notes label Sep 16, 2024
@KevinRansom KevinRansom marked this pull request as ready for review September 16, 2024 08:06
@edgarfgp
Copy link
Contributor

Thanks Kevin.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NO_RELEASE_NOTES Label for pull requests which signals, that user opted-out of providing release notes
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Attributes] Regression, F# 9 compiler cannot find constructor for attribute
5 participants