Skip to content

Conversation

@sergisiso
Copy link
Collaborator

Change Ref2ArrayRange behaviour by letting it pass if the provided node is already in the expanded form, but making it fail if for a expression we cannot guarantee if it could be expanded or not. This will bring validations that now need to be done every time its used to inside the transformation.

@codecov
Copy link

codecov bot commented Dec 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.91%. Comparing base (97dd02d) to head (f71f864).
⚠️ Report is 13 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3260      +/-   ##
==========================================
- Coverage   99.91%   99.91%   -0.01%     
==========================================
  Files         376      376              
  Lines       53529    53522       -7     
==========================================
- Hits        53484    53477       -7     
  Misses         45       45              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sergisiso sergisiso self-assigned this Dec 17, 2025
@sergisiso sergisiso changed the title (closes #2884) Change Ref2ArrayRange behaviour (closes #2884) Allow WHERE with imported symbols by changing Ref2ArrayRange behaviour to do the validations Dec 17, 2025
@sergisiso
Copy link
Collaborator Author

sergisiso commented Dec 17, 2025

@arporter @LonelyCat124 This is ready for review. It changes the Reference2ArrayReference to fail if the outcome cannot be guaranteed, so thing like WHERE can rely on its validation.

This will be followed by #1858 (structures) and #2722 (dependencies), which can be done in a single location after this PR, but it was to big to do here.

Copy link
Member

@arporter arporter left a comment

Choose a reason for hiding this comment

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

Really nice Sergi, it's good to see the simplification that this has achieved.
I'm worried that we are no longer raising an exception when we see a StructureReference - given that we can't handle them this needs to be flagged?
Apart from that, it's just minor tidying. I'll run the integration tests next time (or you could fire them off perhaps once you're done).

@sergisiso sergisiso force-pushed the 2884_change_ref2arrayrange_behaviour branch from 99ab3e0 to 3e1c6b8 Compare December 19, 2025 13:33
@sergisiso
Copy link
Collaborator Author

@arporter This is ready for another look, I just fired the integration test.

Copy link
Member

@arporter arporter left a comment

Choose a reason for hiding this comment

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

Thanks Sergi. Just a bit more tidying to do and we have some indirect coverage changes:
image
I think you can probably just remove the try...except from that bit of code?

@sergisiso
Copy link
Collaborator Author

I think you can probably just remove the try...except from that bit of code?

I already tried this but it didn't work. Unfortunately psyad is unsafe in master as it considers any imported symbol is scalar or a non-elemental call. This happens to be true but it is unsafe. Ultimately we need to remove the except as the transformation guarantees this but if I do it now there is a big regression because most of the psyad real code has imports that are unchecked. We need capabilities to follow imports in psyad and its build system. I modified a test to show this and created an issue and TODOs.

@sergisiso
Copy link
Collaborator Author

@arporter This is ready for another look

Copy link
Member

@arporter arporter left a comment

Choose a reason for hiding this comment

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

Thanks Sergi, I'm happy with everything now. I see the IT were all green so I'll proceed to merge.

@arporter arporter merged commit 470e0f7 into master Jan 6, 2026
15 checks passed
@arporter arporter deleted the 2884_change_ref2arrayrange_behaviour branch January 6, 2026 20:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants