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

Fix Issue 22738 - std.file.tempDir adds an addition / even when it already has one #8373

Merged
merged 5 commits into from Feb 7, 2022

Conversation

rikkimax
Copy link
Contributor

@rikkimax rikkimax commented Feb 5, 2022

Bug https://issues.dlang.org/show_bug.cgi?id=22738

Discovered due to dub CI being broken due to 17488 adding an additional path separator when it can on some platforms already have it at the end.

Workaround to get dub passing CI dlang/dub#2208

@dlang-bot
Copy link
Contributor

Thanks for your pull request and interest in making D better, @rikkimax! We are looking forward to reviewing it, and you should be hearing from a maintainer soon.
Please verify that your PR follows this checklist:

  • My PR is fully covered with tests (you can see the coverage diff by visiting the details link of the codecov check)
  • My PR is as minimal as possible (smaller, focused PRs are easier to review than big ones)
  • I have provided a detailed rationale explaining my changes
  • New or modified functions have Ddoc comments (with Params: and Returns:)

Please see CONTRIBUTING.md for more information.


If you have addressed all reviews or aren't sure how to proceed, don't hesitate to ping us with a simple comment.

Bugzilla references

Auto-close Bugzilla Severity Description
22738 regression std.file.tempDir adds an addition / even when it already has one

⚠️⚠️⚠️ Warnings ⚠️⚠️⚠️

To target stable perform these two steps:

  1. Rebase your branch to upstream/stable:
git rebase --onto upstream/stable upstream/master
  1. Change the base branch of your PR to stable

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + phobos#8373"

@rikkimax
Copy link
Contributor Author

rikkimax commented Feb 5, 2022

This is a regression against master and not stable. The stable branch doesn't have this code in it, which causes said bug.

#5476

It appears that this particular issue may have been encountered in that PR as well.

Copy link
Member

@CyberShadow CyberShadow left a comment

Choose a reason for hiding this comment

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

  • Delphi has IncludeTrailingPathDelimiter, maybe std.path should have an equivalent.
  • Consecutive slashes have no effect on Linux, so it's surprising that it was a problem in Dub. Perhaps the Dub breakage is its own bug that needs to be addressed.

LGTM otherwise

std/file.d Outdated Show resolved Hide resolved
std/file.d Outdated Show resolved Hide resolved
rikki cattermole and others added 3 commits February 6, 2022 04:37
Co-authored-by: Vladimir Panteleev <CyberShadow@users.noreply.github.com>
@rikkimax
Copy link
Contributor Author

rikkimax commented Feb 5, 2022

  • Consecutive slashes have no effect on Linux, so it's surprising that it was a problem in Dub. Perhaps the Dub breakage is its own bug that needs to be addressed.

Dub's CI breakage I have resolved (once PR is merged), so at least we can get PR's merging again once that is done.

I'm not sure if it needs further work on dub's side, my main concern was getting CI passing not necessarily cleaning up garbage input.

@RazvanN7 RazvanN7 merged commit 13b6894 into dlang:master Feb 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
4 participants