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

Remove deprecated range.stridable, range.boundedType, BoundedRangeType #24136

Merged
merged 5 commits into from
Jan 4, 2024

Conversation

vasslitvinov
Copy link
Member

@vasslitvinov vasslitvinov commented Jan 4, 2024

These features were deprecated in 1.31 as follows:

range.boundedType and BoundedRangeType   issue: #17126   implementation: #22059

range.stridable   issue: #17131   implementation: #22441, #22486, #22508

This PR removes support for these features, which was added in the above PRs, and adjusts modules and tests accordingly.

More range/domain deprecated feature removals are next steps.

Testing: standard and gasnet paratests; distribution robustness suite as tested nightly: block, cyclic, replicated.

Signed-off-by: Vassily Litvinov <vasslitvinov@users.noreply.github.com>
Signed-off-by: Vassily Litvinov <vasslitvinov@users.noreply.github.com>
Signed-off-by: Vassily Litvinov <vasslitvinov@users.noreply.github.com>
Signed-off-by: Vassily Litvinov <vasslitvinov@users.noreply.github.com>
Signed-off-by: Vassily Litvinov <vasslitvinov@users.noreply.github.com>
@jabraham17 jabraham17 self-requested a review January 4, 2024 00:56
Copy link
Member

@jabraham17 jabraham17 left a comment

Choose a reason for hiding this comment

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

Looks good!

@vasslitvinov vasslitvinov merged commit 088be3a into chapel-lang:main Jan 4, 2024
7 checks passed
@vasslitvinov vasslitvinov deleted the rm-deprecated-range-ops branch January 4, 2024 18:04
@vasslitvinov vasslitvinov mentioned this pull request Jan 4, 2024
vasslitvinov added a commit that referenced this pull request Jan 4, 2024
This PR fixes test failures introduced by #24136 and #24138.
Suggested by @jabraham17. Trivial, not reviewed.
vasslitvinov added a commit to vasslitvinov/chapel that referenced this pull request Jan 5, 2024
Signed-off-by: Vassily Litvinov <vasslitvinov@users.noreply.github.com>
vasslitvinov added a commit that referenced this pull request Jan 6, 2024
This PR updates .good files with line numbers that changed due to #24136.

Could we instead prediff-out these line numbers?

Yes, by copying from one of multiple existing prediff scripts
(possibly using a more specific path) that contain this:

    !/usr/bin/env bash
    # Ignore line numbers in modules.

    sed '\|CHPL_HOME/modules|s/:[0-9]*:/:nnnn:/' $2 > $2.tmp
    mv $2.tmp $2

SHOULD we prediff-out the these line numbers?

Citing Engin, "this is one of those cases where it is not as clear to me:
this is a memory diagnostic test, and it is kind of important to see
which line numbers are producing the message." So I choose to retain
the (very mild) maintenance burden of keeping the explicit line numbers
in order to provide more robust testing.

For a general background, we apply the above prediff conversion
in 50+ .prediff and PREDIFF scripts. Furthermore we convert such
line numbers automatically when comparing against .bad files, see
`diff-ignoring-module-line-numbers`. We may want to make this conversion
automatic for .good files as well, which I am leaving outside the scope
of this PR.

r: @e-kayrakli
@mppf
Copy link
Member

mppf commented May 3, 2024

@vasslitvinov - I think this PR should have removed this compiler code? Do you know if there is a reason it did not?

// Added to help deprecate BoundedRangeType in 1.31.
// Pattern match the case `use ABC` where ABC is a parenless type function
// with a single statement `return XYZ`. If so, treat it as `use XYZ`,
// resolving `XYZ` in the scope where the function is defined.
if (isFunction(tag)) {
auto function = parsing::idToAst(context, foundId)->toFunction();
if (function->isParenless() && !function->isMethod() &&
function->returnIntent() == Function::ReturnIntent::TYPE) {
if (auto block = function->body()->toBlock()) {
if (block->numStmts() == 1) {
if (auto return_ = block->child(0)->toReturn()) {
if (auto ident = return_->value()->toIdentifier()) {
auto functionScope = scopeForId(context, foundId);
maybeEmitWarningsForId(context, idForErrs, functionScope->id());
return findScopeViz(context, functionScope, ident->name(),
resolving, idForErrs, useOrImport, isFirstPart,
previousPartName);
}
}
}
}
}
}
?

@vasslitvinov
Copy link
Member Author

Good catch, thanks! I will look into it.

vasslitvinov added a commit that referenced this pull request May 6, 2024
This PR removes code that was added temporarily in #22059 to support
deprecation of the enum BoundedRangeType. The latter has been removed in
#24136, so this this code is no longer needed.

Trivial, not reviewed. Suggested by @mppf .
@vasslitvinov
Copy link
Member Author

Removed in #24996.

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.

None yet

3 participants