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

Resolve symbolic links when loading develop.watch.path #661

Merged
merged 1 commit into from
Jul 11, 2024

Conversation

jhrotko
Copy link
Collaborator

@jhrotko jhrotko commented Jul 10, 2024

Resolve symbolic links in develop.watch.path when loading the project

fixes: docker/compose#11849

@jhrotko jhrotko self-assigned this Jul 10, 2024
@jhrotko jhrotko force-pushed the fix-compose-watch-symbolic-links branch from 670ded9 to 90ae054 Compare July 10, 2024 13:58
@jhrotko jhrotko marked this pull request as ready for review July 10, 2024 13:59
@jhrotko jhrotko requested a review from ndeloof as a code owner July 10, 2024 13:59
@jhrotko jhrotko requested a review from glours July 10, 2024 13:59
@jhrotko jhrotko force-pushed the fix-compose-watch-symbolic-links branch from 90ae054 to b591ed7 Compare July 10, 2024 13:59
@ndeloof
Copy link
Collaborator

ndeloof commented Jul 10, 2024

Can't we just rely on https://pkg.go.dev/path/filepath#EvalSymlinks here ?

I also wonder we should do this for all path made absolute, not just watch where this had some side effect, wdyt?

@jhrotko
Copy link
Collaborator Author

jhrotko commented Jul 10, 2024

Can't we just rely on https://pkg.go.dev/path/filepath#EvalSymlinks here ?

@ndeloof, the thing is, the directory is a symbolic link and not the file itself. I tried using EvalSymlinks but it was not enough for this case.

I also wonder we should do this for all path made absolute, not just watch where this had some side effect, wdyt?

I was not sure myself. I think the advantage of adding this change here, you do not need to deal with any transformations going further to compose to any watch code flow path. I can see both solutions working fine in this case

@ndeloof
Copy link
Collaborator

ndeloof commented Jul 10, 2024

related : golang/go#42201
"No change in consensus, so declined."
Such a pleasure to see golang evolution

Signed-off-by: Joana Hrotko <joana.hrotko@docker.com>
@jhrotko jhrotko force-pushed the fix-compose-watch-symbolic-links branch from b591ed7 to 3eb1d09 Compare July 10, 2024 14:27
@jhrotko jhrotko merged commit 769147e into compose-spec:main Jul 11, 2024
8 checks passed
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.

[BUG] docker compose watch does not reflect changes when project directory is a symbolic link
2 participants