Skip to content

pkl.project: check symlink targets#173

Merged
sitaktif merged 1 commit into
apple:mainfrom
malt3:ensure-symlink-target-exists
Jun 3, 2026
Merged

pkl.project: check symlink targets#173
sitaktif merged 1 commit into
apple:mainfrom
malt3:ensure-symlink-target-exists

Conversation

@malt3

@malt3 malt3 commented Jun 1, 2026

Copy link
Copy Markdown
Contributor

The pkl module extension uses symlinks to refer to the PklProject and PklProject.deps.json files. The rctx.symlink function does not guarantee that the symlink points at a real file on the filesystem and it doesn't watch the file for changes.

With this change, we ensure the file exists before symlinking to it and watch it for changes (in case it's deleted by the user).

@malt3

malt3 commented Jun 1, 2026

Copy link
Copy Markdown
Contributor Author

CI is red due to an unrelated issue that is being addressed by #170

The pkl module extension uses symlinks to refer to the PklProject and PklProject.deps.json files.
The rctx.symlink function does not guarantee that the symlink points at a real file on the filesystem and it doesn't watch the file for changes.

With this change, we ensure the file exists before symlinking to it and watch it for changes (in case it's deleted by the user).
@malt3 malt3 force-pushed the ensure-symlink-target-exists branch from c91e426 to e28d0ca Compare June 2, 2026 14:44
@sitaktif sitaktif merged commit 568c248 into apple:main Jun 3, 2026
8 checks passed
@malt3 malt3 deleted the ensure-symlink-target-exists branch June 3, 2026 09:37
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.

2 participants