Skip to content

Remove unused type temp_working_dirt #3054

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

Conversation

hannes-steffenhagen-diffblue
Copy link
Contributor

@hannes-steffenhagen-diffblue hannes-steffenhagen-diffblue commented Sep 27, 2018

This type has been added in 2012 and is presently unused. In its present state
it is difficult to use as it doesn't permit any way to recover from potential
errors (it is instead asserted that no errors can happen, which is not true).

Should functionally like this be needed in the future, I'd recommend a wrapper
function like

template<typename Closure>
void run_with_different_working_dir(
  const std::string& working_dir, Closure closure);

Which would change the working directory, execute the closure and change the
working directory back afterwards, throwing a system_exceptiont on failure.

  • Each commit message has a non-empty body, explaining why the change was made.
  • My contribution is formatted in line with CODING_STANDARD.md.
  • Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • White-space or formatting changes outside the feature-related changed lines are in commits of their own.

Copy link
Collaborator

@tautschnig tautschnig left a comment

Choose a reason for hiding this comment

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

Nit picks: 1) in the commit message: s/functionally/functionality/ and 2) remove the blank line at the end of tempdir.cpp

Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

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

This PR failed Diffblue compatibility checks (cbmc commit: 8264abf).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/86163537
Status will be re-evaluated on next push.
Please contact @peterschrammel, @thk123, or @allredj for support.

Common spurious failures:

  • the cbmc commit has disappeared in the mean time (e.g. in a force-push)
  • the author is not in the list of contributors (e.g. first-time contributors).

Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

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

Passed Diffblue compatibility checks (cbmc commit: 77afd48).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/86164156

@hannes-steffenhagen-diffblue
Copy link
Contributor Author

@tautschnig Fixed the type and removed the extra line

Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

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

Passed Diffblue compatibility checks (cbmc commit: b48381d).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/86170412

@hannes-steffenhagen-diffblue
Copy link
Contributor Author

AWS fails due to seemingly unrelated timeout error. I've restarted the build.

@hannes-steffenhagen-diffblue
Copy link
Contributor Author

I did retry the CodeBuild thing and it passed, but it didn't update the status in here. Not sure what's going on with that.

@tautschnig
Copy link
Collaborator

Maybe we can merge some other PR so that you can rebase this one ;-)

@tautschnig
Copy link
Collaborator

@hannes-steffenhagen-diffblue You can now do a rebase.

This type has been added in 2012 and is presently unused. In its present state
it is difficult to use as it doesn't permit any way to recover from potential
errors (it is instead asserted that no errors can happen, which is not true).

Should functionality like this be needed in the future, I'd recommend a wrapper
function like

```
template<typename Closure>
void run_with_different_working_dir(
  const std::string& working_dir, Closure closure);
```

Which would change the working directory, execute the closure and change the
working directory back afterwards, throwing a system_exceptiont on failure.
@hannes-steffenhagen-diffblue
Copy link
Contributor Author

@tautschnig done

Copy link
Contributor

@allredj allredj left a comment

Choose a reason for hiding this comment

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

Passed Diffblue compatibility checks (cbmc commit: e2fc031).
Build URL: https://travis-ci.com/diffblue/test-gen/builds/86268564

@tautschnig tautschnig merged commit 6cb4d57 into diffblue:develop Sep 28, 2018
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.

3 participants