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

[Bug]: Unstable iterator overloads always warn, even if another overload is used #26590

Open
lydia-duncan opened this issue Jan 23, 2025 · 1 comment

Comments

@lydia-duncan
Copy link
Member

lydia-duncan commented Jan 23, 2025

Summary of Problem

Description:
In fixing a bug with set's iterators, I discovered that marking any overload of an iterator as unstable will cause it to fire every time that iterator is referred to, even if ultimately the iterator used was not the unstable one.

Is this issue currently blocking your progress?
No, though it is encouraging me to only mark one of the iterators as unstable instead of all of them, since it'll trigger for all cases anyways.

Steps to Reproduce

Source Code:

A test demonstrating the issue is a little too complicated to put here, so I'll just link to the future I'm filing

Compile command:
chpl foo.chpl --warn-unstable

Execution command:
N/A

Associated Future Test(s):
test/unstable-keyword/iterator/onlySerial.chpl #26591

Configuration Information

  • Output of chpl --version: 2.4.0 pre-release
  • Output of $CHPL_HOME/util/printchplenv --anonymize: any
  • Back-end compiler and version, e.g. gcc --version or clang --version: any
  • (For Cray systems only) Output of module list: N/A
@lydia-duncan
Copy link
Member Author

Note that I've only written a test for the serial case, but this was happening for standalone, leader, and follower iterators as well. Tests should be added for those before considering this issue resolved

lydia-duncan added a commit that referenced this issue Jan 23, 2025
…6591)

[reviewed by @benharsh because I lacked confidence, thanks!]

See #26590 . Basically, marking any iterator as unstable will cause the
unstable warning to fire, even if that particular iterator is not used.
This test demonstrates the issue for serial iterators, but standalone,
leader, and follower iterators were also exhibiting the same behavior
(and I suspect will be solved by the same solution).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant