Skip to content

Fix regression with workdir symlinks#1053

Merged
benibenj merged 2 commits intomicrosoft:mainfrom
deribaucourt:main
Oct 9, 2024
Merged

Fix regression with workdir symlinks#1053
benibenj merged 2 commits intomicrosoft:mainfrom
deribaucourt:main

Conversation

@deribaucourt
Copy link
Copy Markdown
Contributor

See my comment in #580 (comment)
While upgrading from vsce 2.3 to 3.1, I had this regression which prevented building my package.
I use the following package.json extract:

  "workspaces": [
    "src/lib"
  ]

And this folder is a symlink.

If a workdir was refering a symlink directory, we would pass it to yazl, which would error out because it's a directory.

glob recommends using follow: true to consider directory symlinks as directories in the collection.

If a workdir was refering a symlink directory, we would pass it to
yazl, which would error out because it's a directory.

glob recommends using `follow: true` to consider directory symlinks
as directories in the collection.
@ije
Copy link
Copy Markdown

ije commented Sep 28, 2024

i also failed to upgrade to 3.1, and i'm using a local package:

 "dependencies": {
    "typescript-esmsh-plugin": "./typescript-esmsh-plugin"
  }

@deribaucourt
Copy link
Copy Markdown
Contributor Author

deribaucourt commented Sep 30, 2024

Hello @ije, by using this PR you should be able to fix your issue.
Once it is merged, you can use the next official releases.

Download https://github.com/deribaucourt/vscode-vsce/tree/main then build and package vsce and install that version in your workspace.

@benibenj
Copy link
Copy Markdown
Contributor

benibenj commented Oct 4, 2024

Thanks for looking into this. I feel we need to be a bit careful with this which is why I would propose to have this behind a cli argument. Maybe --follow-symlinks?

This new behavior fixes packaging with symlinks to directories in
extensions. We make it optional in case someone wants to keep the
intermediate behavior.
@deribaucourt
Copy link
Copy Markdown
Contributor Author

Thanks for your review @benibenj
I added a new configuration option for the commands package, ls and publish.
I did not test publish because I don't want to push right now, but the code is identical to the other commands.

@benibenj benibenj enabled auto-merge October 9, 2024 21:26
@benibenj benibenj added this to the October 2024 milestone Oct 9, 2024
@benibenj benibenj merged commit 980d621 into microsoft:main Oct 9, 2024
deribaucourt added a commit to yoctoproject/vscode-bitbake that referenced this pull request Jan 2, 2025
Following the vsce update, this argument is now required because we
have a `lib` symlink folder.

See microsoft/vscode-vsce#1053
deribaucourt added a commit to savoirfairelinux/vscode-bitbake that referenced this pull request Jan 2, 2025
Following the vsce update, this argument is now required because we
have a `lib` symlink folder.

See microsoft/vscode-vsce#1053
deribaucourt added a commit to yoctoproject/vscode-bitbake that referenced this pull request Jan 8, 2025
Following the vsce update, this argument is now required because we
have a `lib` symlink folder.

See microsoft/vscode-vsce#1053
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.

4 participants