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

Trigger the linker phase when linked files other than modules change #609

Closed
jneira opened this issue Jan 10, 2018 · 3 comments
Closed

Trigger the linker phase when linked files other than modules change #609

jneira opened this issue Jan 10, 2018 · 3 comments

Comments

@jneira
Copy link
Collaborator

jneira commented Jan 10, 2018

Actually eta does not regenerate the main jar if the jars included as input files to be linked change.
If you do a etlas --make Module.hs module-dep.jar and later module-dep.jar changes, a second call doesn't generate a new run-module.jar with those changes. This is so even if you add or remove jars from the call.
A full build including compile would not be neccesary, only a new linking.

@jneira
Copy link
Collaborator Author

jneira commented Jan 10, 2018

The change could be modify the ETA.Main.DriverPipeline.linkingNeeded to take in account all the files involved in the link phase.
Actually ghc check if linking is needed:

A posiible solution for eta could be save the linked info with all files involved in the final jar (f.e. in a file called .link-info in the root).
This info could be a line for each file linked with the name and a hash. In each call to eta, it would build that info and compare it with the last one, triggering the link if they don't match.
The hash of each file could be a checksum of the file content or a hashed string with the full path, modification time and size.

As __extras.jar with the java sources is one of those files we could use its hash to trigger the compile and link of java sources when they change, as required in the issue #594.

@rahulmutt
Copy link
Member

I like this solution a lot better and as you said, it'll fix a lot of problems at once.

@jneira
Copy link
Collaborator Author

jneira commented Jan 25, 2018

Closed by #622

@jneira jneira closed this as completed Jan 25, 2018
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

2 participants