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
Add revision 6.e and improve multi-revision support #2852
Conversation
Added warnings on use of PREVIEW with released specifications and on missing PREVIEW when used on unreleased specifications.
|
See also: Raku/roast#506 |
In support of PR rakudo/rakudo#2852
Like this: Raku/roast#530? |
|
Ah, version dependant spectest.data... Not sure if this is really a good idea as it would complicate things a lot. I think a spectest must skip depending on the current compiler version. Could be fudged, or something like: |
src/Perl6/World.nqp
Outdated
| $ver-match.PRECURSOR.worry('PREVIEW modificator is used with released specification 6.' ~ $rev) | ||
| if nqp::isle_s($rev, $default_rev) && nqp::iseq_s($rev_mod, 'PREVIEW'); | ||
|
|
||
| $ver-match.PRECURSOR.worry( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this one should probably be an error.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is revision definition file PERL6_SPECS in tools/templates now. Looks like:
# [*]version [suffix]
# * defines the current spec
c
*d PREVIEW # TODO: It's about time to drop PREVIEW
#e PREVIEW
If there is no PREVIEW for a revision then this is a error. I'll re-check if this is the case. Otherwise the warning is for the transition period to allow graceful migration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I think must be done differently here is don't hardcode PREVIEW but rely on what is defined in PERL6_SPECS.
src/Perl6/World.nqp
Outdated
| my $lang_ver := '6.' ~ $revision; | ||
|
|
||
| self."!check-for-PREVIEW"($ver-match, $revision, $default_rev, @vparts[2] || '') | ||
| if ($revision eq 'c') || ($lang_ver eq $comp.config<language-version>); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm, why the explicit check for 'c' here? Should we not be getting the language version (c, d, etc.) and comparing it with le against the version we're currently at?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no CORE.c.setting, thus – special case for c.
src/Perl6/World.nqp
Outdated
| } | ||
|
|
||
| # Does this makes any sense besides of speeding up loading assuming that the default language version would be | ||
| # the most used one? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that's what it's doing.
Added warnings on use of PREVIEW with released specifications and on missing PREVIEW when used on unreleased specifications.
A modifier is a text suffix following version revision in the version string. I.e. PREVIEW is a modifier in v6.e.PREVIEW string. Modifiers can be flagged as required or deprecated or not flagged at all. For example: d TEST -TESTDEPR e !PREVIEW TESTDEPR is deprecated. While use of 'v6.e' will cause the language to panic because only 'v6.e.PREVIEW' form is allowed. TEST is a plain optional modifier. Proposed use of requirement/deprecation during a default language revision switch: 1. PREVIEW is required until revision is released. 2. PREVIEW is plain optional for 2-3 months after revision release to allow graceful transition of modules. 3. PREVIEW is deprecated for another 3-4 months.
For testing purposes added sub CORE-SETTING-REV which would return the revision letter of the currently loaded setting.
See if correct CORE.<rev>.setting is loaded with use v6.<rev>
|
Everything is ready for merge. Would await for Raku/problem-solving#31 to decide how to handle spectests. |
Also make changes to language versions documentation. The last section of it has been removed as outdated and as something which better belongs to a blog post rather than to a documentation paper.
Leave it for after the next rakudo release, perhaps.
This PR is based upon PR #2816.
Also fixes #2783 and adds a warning when
.PREVIEWis used with a released specification or not used with unreleased.