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

capgen should only overwrite modified files #278

Closed
gold2718 opened this issue Apr 3, 2020 · 1 comment
Closed

capgen should only overwrite modified files #278

gold2718 opened this issue Apr 3, 2020 · 1 comment
Assignees
Labels
bug capgen bugs, requests, etc. that involve ccpp_capgen capgen-unification

Comments

@gold2718
Copy link
Collaborator

gold2718 commented Apr 3, 2020

capgen currently always overwrites all generated code (caps, ccpp_kinds.F90). By default, it should only overwrite an existing file if that file has been modified. Here is the proposed solution.

  • Generate all files to a temporary directory (e.g., if the capgen directory is ccpp, generate into ccpp_tmp).
  • Only copy files from the temporary directory if they do not exist in the configured destination or have changed.
  • Remove the temporary directory.

In addition, capgen will have a new switch, --force, which reproduces the current behavior (i.e., regnerate all files). This could be implemented as first removing the existing directory or by specifying that the temporary directory is the same as the existing directory (my preference as it would not overwrite anything unless the analysis phase is successful).

@gold2718 gold2718 added bug capgen bugs, requests, etc. that involve ccpp_capgen labels Apr 3, 2020
@gold2718 gold2718 self-assigned this Apr 3, 2020
@gold2718 gold2718 added this to the capgen unification milestone Oct 6, 2020
gold2718 pushed a commit that referenced this issue Nov 24, 2020
Build updates for unification
Only overwrite modified files (#278)
Parse all SDFs from specified directories (#293)
@gold2718
Copy link
Collaborator Author

gold2718 commented Dec 1, 2020

Fixed in #339

@gold2718 gold2718 closed this as completed Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug capgen bugs, requests, etc. that involve ccpp_capgen capgen-unification
Projects
None yet
Development

No branches or pull requests

1 participant