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

Add revision 6.e and improve multi-revision support #2852

Merged
merged 27 commits into from May 31, 2019

Conversation

vrurg
Copy link
Member

@vrurg vrurg commented Apr 18, 2019

This PR is based upon PR #2816.

Also fixes #2783 and adds a warning when .PREVIEW is used with a released specification or not used with unreleased.

Added warnings on use of PREVIEW with released specifications and on
missing PREVIEW when used on unreleased specifications.
@AlexDaniel
Copy link
Contributor

See also: Raku/roast#506

vrurg added a commit to vrurg/roast that referenced this pull request Apr 18, 2019
@vrurg
Copy link
Member Author

vrurg commented Apr 18, 2019

See also: perl6/roast#506

Like this: Raku/roast#530?

@vrurg
Copy link
Member Author

vrurg commented Apr 18, 2019

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:

skip() unless v6.e ∈ $*PERL.compiler.versions

@vrurg vrurg mentioned this pull request May 5, 2019
src/Perl6/World.nqp Outdated Show resolved Hide resolved
src/Perl6/ModuleLoader.nqp Outdated Show resolved Hide resolved
$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(
Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member Author

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.

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>);
Copy link
Member

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?

Copy link
Member Author

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.

}

# Does this makes any sense besides of speeding up loading assuming that the default language version would be
# the most used one?
Copy link
Member

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.

vrurg added 10 commits May 16, 2019 20:22
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>
@vrurg
Copy link
Member Author

vrurg commented May 23, 2019

Everything is ready for merge. Would await for Raku/problem-solving#31 to decide how to handle spectests.

vrurg added 7 commits May 30, 2019 15:17
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.
@vrurg vrurg merged commit 969aa44 into rakudo:master May 31, 2019
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.

“Cannot call method 'typed_panic' on a null object” when trying to use v6.e or v6.e.PREVIEW
4 participants