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

Fix deep-cloning of subroutiens and modules (fix #174) #175

Merged
merged 2 commits into from
Oct 17, 2023

Conversation

mlange05
Copy link
Collaborator

As the title implies, we were indeed not rebuilding nested ScopedNode objects in the duplication Transformer used for deep-copying (cloning) of Subroutine/Module objects. This PR fixes this and adds tests that include nested ScopedNode objects (Associate for subroutine and TypeDef for modules) in the duplicated IR.

This should fix issue #174.

Many thanks to @JoeffreyLegaux for reporting and providing the reproducer for the subroutine case. I've slightly shortened the example code, but in essence it's the same problem. 😉 Please do confirm that this fixes things as you'd expect.

@mlange05 mlange05 requested a review from reuterbal October 17, 2023 09:44
@github-actions
Copy link

Documentation for this branch can be viewed at https://sites.ecmwf.int/docs/loki/175/index.html

@mlange05 mlange05 force-pushed the naml-fix-subroutine-deep-clone branch from 842b823 to 31e5e43 Compare October 17, 2023 10:00
Copy link
Collaborator

@reuterbal reuterbal left a comment

Choose a reason for hiding this comment

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

Thanks for fixing this and providing tests for it! That was a subtle oversight, many thanks to @JoeffreyLegaux for flagging this.

@JoeffreyLegaux
Copy link
Contributor

Hi @mlange05, I just tested this branch on a large actual case, and everything seems to work fine. Thanks for the quick fix !

@reuterbal reuterbal merged commit af8ec9f into main Oct 17, 2023
10 checks passed
@reuterbal reuterbal deleted the naml-fix-subroutine-deep-clone branch October 17, 2023 11:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants