-
Notifications
You must be signed in to change notification settings - Fork 207
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
Support symlinks within package #308
Comments
I don't fully understand the setup. Can you elaborate with actual path names and explaining what points to where? Also, what exactly gets removed? |
@joaomoreno Lets say I have a mac framework(On your Mac you can go to: |
May I ask why you are including a macOS framework within your extension? |
I have created a custom mac framework which contains my business logic. Basically i am working on debug adapter. The APIs are exposed through that mac framework. The framework contains resources too. And yes i can make that a dylib but the problem is it has more dependencies on other custom frameworks. What i want to ask is, is there any option by which i can instruct |
vsce package
command removes symlink from mac framework
There's no good suggestion I can give you right now apart from zipping up the framework beforehand and unzipping it at activation time. Needs fixing to support symlinks. Sorry about that! |
No problem. Will look for workaround for the time being. Thanks anyways :) |
I'm also having this. I'm spawning external Electron apps for some features in the extension. The Electron binary location on macOS (no problem on Windows with EXE file) is I think we can add an option that allows user to enable this feature (e.g. called So vsce package will work as it currently is. If user needs this feature, vsce package --include-symlinks will do the job. What are your thoughts? I guess I'll be able to open a PR for this |
@cagdas001 The problem is not only with
Now when I installed this The workaround that I am using is(till the time it gets fixed in
|
@ArGup thanks, I'll temporarily use a similar solution to yours If VSCode also ignores symlinks within package (have not investigated yet, how it does this), maybe we can add a flag in the package manifest. If I think this optional way is better rather than getting all symlinks in all cases |
I can confirm I temporarily fixed it for my usecase by manually resolving the symlink (i.e. duplicating the files). |
Vscode extension packaging ignores symlinks. microsoft/vscode-vsce#308
I use pnpm which symlinks modules. Vsce being unable to support symlinks means preserving dependencies within |
Hi! Dead simple npm links are also not supported |
Hello, Is there any progress on this? My use-case is a little different (not embedding Mac Frameworks), but I do want to have symlinks across modules in my extension. I am creating an LSP extension, and my extension structure is as such:
... where My extension comes with native Node bindings, so I cannot webpack them into one JavaScript source. The LSP part works between My workaround was something similar: // Does not work, as `native` does not exist. In my dev workspace where
// I perform `vsce package`, it is a symlink to `server/node_modules`
import { foo } from 'native';
// Workaround
const { foo } = require('../../../native') as typeof import('native'); Workaround works, but I just wanted to provide additional use-cases for this feature. Thanks, Kevin |
Is there any way to raise awareness about this issue? In a world where many extensions are using language-servers, which are separated projects, they also need to test with main branch of their language-servers, so they need to build an extension using a linked npm package. |
Agreed, to test unreleased versions for cross project testing it requires hack like these https://github.com/ansible/ansible-language-server/blob/v0.6.1/.github/workflows/vscode.yml#L37 which results in other problems. |
As the main issue with this is related with That made us start a switch from npm to yarn for our extension and once #743 is sorted we will be able to finish the switch. |
I am working on an extension which uses a node addon. The node addon in turn has a dependency on a custom mac framework that I am bundling with it. Everything work file in development mode. But when I package the extension using
vsce package
, it removes the symlinks from the Mac framework. Symlinks are required in a mac framework else it does not work. The.vsix
file, when installed does not load the framework and the extension fails. Is there any option, by which I can instructvsce
not to remove symlinks.I have tried not to bundle the framework with extension and added the framework as a dependency(in package.json). But
vsce
brings all the dependencies while packaging. Ideally the dependencies should come at runtime i.e. when VSCode is installing the extension.I then tried to unpackage the
.vsix
file and then replaced the framework with my original framework and then repackaged it into.vsix
. But when VSCode installs.vsix
, it again removes the symlinks from framework, thereby corrupting it.Please guide. Thanks.
The text was updated successfully, but these errors were encountered: