meraymond2 / idris-vscode

Idris front-end for VS Code
MIT License
59 stars 10 forks source link

Failing to package vsix file using vsce #10

Closed timsueberkrueb closed 4 years ago

timsueberkrueb commented 4 years ago

Hey, first of all, thank you for this great extension. It works perfectly for me when running in extension debug mode via VSCode. However, when trying to create a .vsix file for local installation using vsce, the resulting file is incomplete:

vsce package

Contents of the resulting idris-vscode-0.0.4.vsix:

If I manually bundle the required files (also tested with webpack) and install the resulting zip/vsix file, it works.

It's perfectly possible that I'm missing something or that the project is not setup yet for bundling or that my local setup is broken. Any pointers would be highly appreciated.

dustypomerleau commented 4 years ago

vsce should definitely generate an extension/ directory containing all the goodies. Local setup is a likely culprit. When I run vsce package on the current repo, I get the following contents:

~/Desktop/idris-vscode-0.0.4
├── [Content_Types].xml
├── extension
│   ├── CHANGELOG.md
│   ├── LICENSE.txt
│   ├── README.md
│   ├── idris-vscode.code-workspace
│   ├── language-configuration.json
│   ├── node_modules
│   ├── out
│   ├── package.json
│   └── syntaxes
└── extension.vsixmanifest

My setup:

macOS 10.15.7 VS Code 1.49.2 Node 14.12.0 vsce 1.80.0

timsueberkrueb commented 4 years ago

Thank you! It appears like the node snap package I was using is at fault. I just replaced that with a deb-based node installation and it works. Sorry for the noise - I will report the (likely) snap-related issue.

Executing prepublish script 'npm run vscode:prepublish'...
npm WARN lifecycle The node binary used for scripts is /snap/bin/node but npm is using /snap/node/3082/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.

> idris-vscode@0.0.4 vscode:prepublish /home/tim/Dev/GitHub/meraymond2/idris-vscode
> npm run compile

npm WARN lifecycle The node binary used for scripts is /snap/bin/node but npm is using /snap/node/3082/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with.

> idris-vscode@0.0.4 compile /home/tim/Dev/GitHub/meraymond2/idris-vscode
> tsc -p ./

 DONE  Packaged: /home/tim/Dev/GitHub/meraymond2/idris-vscode/idris-vscode-0.0.4.vsix (2 files, 1.04KB)

Did not work with node snap versions 14.12.0 (3082) and 12.18.4 (3041) on Ubuntu 20.04 with vsce 1.80.0, code snap 1.49.2 (45). Did work with node version v14.12.0 from deb.nodesource.com.

EDIT: Likely related to:

EDIT: AppArmor denials:

Sep 27 16:54:05 ubpo01 kernel: [20602.120858] audit: type=1400 audit(1601218445.511:10619): apparmor="DENIED" operation="file_inherit" profile="/snap/snapd/9279/usr/lib/snapd/snap-confine" pid=55060 comm="snap-confine" family="unix" sock_type="stream" protocol=0 requested_mask="send receive" denied_mask="send receive" addr=none peer_addr=none
Sep 27 16:54:05 ubpo01 kernel: [20602.120863] audit: type=1400 audit(1601218445.511:10620): apparmor="DENIED" operation="file_inherit" profile="/snap/snapd/9279/usr/lib/snapd/snap-confine" pid=55060 comm="snap-confine" family="unix" sock_type="stream" protocol=0 requested_mask="send receive" denied_mask="send receive" addr=none peer_addr=none
Sep 27 16:54:05 ubpo01 kernel: [20602.120865] audit: type=1400 audit(1601218445.511:10621): apparmor="DENIED" operation="file_inherit" profile="/snap/snapd/9279/usr/lib/snapd/snap-confine" pid=55060 comm="snap-confine" family="unix" sock_type="stream" protocol=0 requested_mask="send receive" denied_mask="send receive" addr=none peer_addr=none
Sep 27 16:54:05 ubpo01 kernel: [20602.293033] audit: type=1400 audit(1601218445.683:10622): apparmor="DENIED" operation="file_inherit" profile="/snap/snapd/9279/usr/lib/snapd/snap-confine" pid=55113 comm="snap-confine" family="unix" sock_type="stream" protocol=0 requested_mask="send receive" denied_mask="send receive" addr=none peer_addr=none
Sep 27 16:54:05 ubpo01 kernel: [20602.293037] audit: type=1400 audit(1601218445.683:10623): apparmor="DENIED" operation="file_inherit" profile="/snap/snapd/9279/usr/lib/snapd/snap-confine" pid=55113 comm="snap-confine" family="unix" sock_type="stream" protocol=0 requested_mask="send receive" denied_mask="send receive" addr=none peer_addr=none
Sep 27 16:54:05 ubpo01 kernel: [20602.293039] audit: type=1400 audit(1601218445.683:10624): apparmor="DENIED" operation="file_inherit" profile="/snap/snapd/9279/usr/lib/snapd/snap-confine" pid=55113 comm="snap-confine" family="unix" sock_type="stream" protocol=0 requested_mask="send receive" denied_mask="send receive" addr=none peer_addr=none
Sep 27 16:54:08 ubpo01 kernel: [20605.002073] audit: type=1400 audit(1601218448.391:10625): apparmor="DENIED" operation="file_inherit" profile="/snap/snapd/9279/usr/lib/snapd/snap-confine" pid=55208 comm="snap-confine" family="unix" sock_type="stream" protocol=0 requested_mask="send receive" denied_mask="send receive" addr=none peer_addr=none
Sep 27 16:54:08 ubpo01 kernel: [20605.002076] audit: type=1400 audit(1601218448.391:10626): apparmor="DENIED" operation="file_inherit" profile="/snap/snapd/9279/usr/lib/snapd/snap-confine" pid=55208 comm="snap-confine" family="unix" sock_type="stream" protocol=0 requested_mask="send receive" denied_mask="send receive" addr=none peer_addr=none
Sep 27 16:54:08 ubpo01 kernel: [20605.002078] audit: type=1400 audit(1601218448.391:10627): apparmor="DENIED" operation="file_inherit" profile="/snap/snapd/9279/usr/lib/snapd/snap-confine" pid=55208 comm="snap-confine" family="unix" sock_type="stream" protocol=0 requested_mask="send receive" denied_mask="send receive" addr=none peer_addr=none
Sep 27 16:54:08 ubpo01 kernel: [20605.163071] audit: type=1400 audit(1601218448.555:10628): apparmor="DENIED" operation="file_inherit" profile="/snap/snapd/9279/usr/lib/snapd/snap-confine" pid=55236 comm="snap-confine" family="unix" sock_type="stream" protocol=0 requested_mask="send receive" denied_mask="send receive" addr=none peer_addr=none