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

test: demonstrate a dependency cycle between modules field and rule #10370

Conversation

anmonteiro
Copy link
Collaborator

this might be the "rules in the same dir" / masking limitation thing that prevents us from generating melange js in the same directory, but I'm not sure?

@emillon
Copy link
Collaborator

emillon commented Apr 3, 2024

I think what's happening is that the (modules) field is evaluated directly as the rules are loaded from the directory, yes. This is how it's described in #9578 at least.

@rgrinberg
Copy link
Member

Yes, you should move the rule stanza to a different directory and then copy the file into your desired directory with a copy rule.

@jchavarri
Copy link
Collaborator

Should this change be consolidated with eif-library-cycle.t?

@rgrinberg
Copy link
Member

Btw, I think we need to refine the repro further still. Roughly, what we need is:

  1. libraries x and y in the same dir.
  2. library x needs a dynamic list of modules. The dynamic list should exist in some separate directory to avoid the issue Etienne mentioned.
  3. the dynamic list of modules needs to be generated by resolving y somehow. E.g. by running an executable that uses y

Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com>
@anmonteiro anmonteiro force-pushed the anmonteiro/test-lib-available-dynamic-modules branch from 9f97e14 to 06ee04c Compare April 4, 2024 19:32
Signed-off-by: Antonio Nuno Monteiro <anmonteiro@gmail.com>
@anmonteiro anmonteiro force-pushed the anmonteiro/test-lib-available-dynamic-modules branch from 68c7cab to b2e7b97 Compare April 4, 2024 19:33
@anmonteiro
Copy link
Collaborator Author

@rgrinberg I think the test now illustrates the case you described. Could you check again, please?

@anmonteiro anmonteiro enabled auto-merge (squash) April 4, 2024 21:12
@anmonteiro anmonteiro merged commit da87989 into ocaml:main Apr 4, 2024
1 of 2 checks passed
@anmonteiro anmonteiro deleted the anmonteiro/test-lib-available-dynamic-modules branch April 4, 2024 21:12
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

4 participants