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

Bring back --touch option to DSC interface #135

Closed
gaow opened this issue May 6, 2018 · 0 comments
Closed

Bring back --touch option to DSC interface #135

gaow opened this issue May 6, 2018 · 0 comments

Comments

@gaow
Copy link
Member

gaow commented May 6, 2018

RE point 2 in issue #133: "touch" means to ignore changes in script and force everything up to date without rerun. As discussed in #133, a safe --touch is very difficult because the way file are named and their signatures handled in DSC. That is the reason I initially implemented a --touch option yet left it out the command interface: not removed, just do not show in the help message.

However I do use it myself quite often, because it is really a pain to make cosmetic changes to a computational intensive script and trigger a rerun. I can imaging how irritating it is for other DSC users who cannot see this possibility. So I brought back --touch to the command interface in current master. It reads:

  --touch          "Touch" output files if exist, to mark them "up-to-
                        date". It will override "--skip" option. Note that
                        time stamp is irrelevant to whether or not a file is
                        up-to-date. Files will be considered to "exist" as
                        long as module name, module parameters and variables,
                        module script name and command arguments remain the
                        same. Module script content do not matter. The output
                        files will be "touched" to match with the current
                        status of module code. (default: False)

Again, this is not "bullet proof"!! (for reasons in #133 which are too difficult to explain it fully even to internal users). However, as long as the result/*.map.mpk file (a DSC meta data file) presents and is up-to-date, the --touch option should be safe to "touch" everything to the state indicated by this meta-data file. I now added a check for presence of this file before applying --touch. So we are almost safe. It can still be messed up but it really will take some skills. I can double check it by creating a file signature for this meta file and only touch it if this signature matches, but it makes it harder to port a DSC from one computer to another without rerunning; and it still is not bullet proof ... so I guess I'll live without double-checking.

@gaow gaow added the discussion label May 6, 2018
@gaow gaow closed this as completed May 11, 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

1 participant