Giter VIP home page Giter VIP logo

Comments (6)

busticated avatar busticated commented on June 10, 2024

fwiw, it looks like the most-recent install that came down into the stable directory was v1.30.2

from my ubuntu box i ran:

.vscode-test/stable/VSCode-linux-x64/bin/code --version

which returned:

1.30.2
61122f88f0bf01e2ac16bdb9e1bc4571755f5bd8
x64

after running npm i and then ls ./packages/particle-vscode-core/.vscode-test/, i see:

stable
vscode-1.33.1

but obviously stable is just a left-over from before the change - if i remove it, it's not re-installed

from vscode-extension-vscode.

octref avatar octref commented on June 10, 2024

after running npm i, the vscode dependency used to download and unpack a local copy of the VSCode app here:

Nope, that's only downloaded after running the integration test script.

scripts i've written to manually install my extensionDependencies (per #74) are breaking b/c they can’t find the code binary

Well, I don't think we ever made any promise as to which directory the binary will be downloaded to.

You can use vscode-test's API directly to get the executable path.

So your current choices are:

  • Lock to the old version of vscode for now.
  • Make your script depend on vscode-test directly. (Without #157 you still need the vscode dependency, though). This is a work in progress that hopefully will make it easier to install vscode.d.ts, do integration test, etc for extensions. I suggest adopting this in a month or two.

from vscode-extension-vscode.

busticated avatar busticated commented on June 10, 2024

thanks @octref

Nope, that's only downloaded after running the integration test script

ah, i see that now thanks. looking at the current logic, it seems like over time the .vscode-test/ directory will steadily accumulate copies of the VSCode app (e.g. vscode-1.33.1, vscode-1.33.2, etc) - am i missing something? are those ever cleaned up?

You can use vscode-test's API directly to get the executable path.

sounds good πŸ‘ are there any plans to automatically resolve extensionDependencies at test-time (or otherwise) or is the official recommendation (per #74) still for extension authors to manage that themselves?

from vscode-extension-vscode.

octref avatar octref commented on June 10, 2024

automatically resolve extensionDependencies at test-time

Not really, but you can easily do that with vscode-test API:

  /**
   * Manually download VS Code 1.30.0 release for testing.
   */
  const vscodeExecutablePath = await downloadAndUnzipVSCode()

  // Write your own logic for downloading the VSIX and installing it
  cp.spawnSync(vscodeExecutablePath, ['--install-extensions', VSIX_PATH]);

  await runTests({
    vscodeExecutablePath,
    extensionPath,
    testRunnerPath,
    testWorkspace
  })

are those ever cleaned up?

No, but .vscode-test should be put to gitignore. Having version in the dir name avoids version mismatch. See #96.

from vscode-extension-vscode.

busticated avatar busticated commented on June 10, 2024

Not really, but you can easily do that with vscode-test API

πŸ‘ that's what i do today but with the addition of calling downloadAndUnzipVSCode() myself so i can know the exec path.

No, but .vscode-test should be put to gitignore. Having version in the dir name avoids version mismatch. See #96.

yep, pretty sure the default recommendation (and yeoman generator output) ignores .vscode-test/ as i am currently.

i don't yet see the benefit of having multiple versions installed within .vscode-test/. naively, i would think by default you'd want to look at the current extension's engines entry - e.g.

"engines": {
    "vscode": "^1.27.0"
}

and simply install the latest VSCode that meets that spec into .vscode-test/stable but obviously i'm not as familiar with all the details as you are.

as it is now, i don't think engines is even being considered in this case so a version mismatch is still possible if for example your engines was something like 1.27.x, no?

i suppose it would be nice to have the option of running your tests against multiple VSCode versions but i don't see that being helpful as a default πŸ€·β€β™‚

from vscode-extension-vscode.

octref avatar octref commented on June 10, 2024

engines is even being considered in this case so a version mismatch is still possible if for example your engines was something like 1.27.x,

engines only matter for launching the extension in VS Code now.

i suppose it would be nice to have the option of running your tests against multiple VSCode versions but i don't see that being helpful as a default πŸ€·β€β™‚

The default behavior is always to use latest released version with the following code:

  /**
   * Basic usage
   */
  await runTests({
    extensionPath,
    testRunnerPath,
    testWorkspace
  })

from vscode-extension-vscode.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.