Skip to content

Test Discovery Error (Swift 5.8) #394

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

Closed
compnerd opened this issue Aug 20, 2022 · 8 comments
Closed

Test Discovery Error (Swift 5.8) #394

compnerd opened this issue Aug 20, 2022 · 8 comments
Labels
bug Something isn't working SwiftPM Swift Package Manager

Comments

@compnerd
Copy link
Member

Describe the bug
It seems that test discovery is broken on main with the latest version of the plugin. Building and running tests simply states:

Test Discovery Error
 warning: '--list-tests' option is deprecated; use 'swift test list' instead
Error: unknown option '--skip-build'
Usage: list <options>
  See 'list --help' for more information.

To Reproduce
Steps to reproduce the behavior:

  • Install a recent build of Swift from main (see swift.org/download)
  • Try build tests for SourceKit-LSP

Expected behavior
Tests to be identified and be able to be executed.

Environment

  • OS: Windows 10
  • Swift version: Swift version 5.8-dev (LLVM b69b0f8449614a5, Swift 6ef09e95444e4c4)
  • Visual Studio Code version: 1.70.2
  • vscode-swift version: 0.7.0

Additional context
Not sure how long you can download the exact version of the toolchain, but it is here: https://ci-external.swift.org/job/swift-PR-build-toolchain-windows/154/artifact/build/artifacts/installer.exe

@compnerd compnerd added the bug Something isn't working label Aug 20, 2022
@adam-fowler
Copy link
Contributor

adam-fowler commented Aug 21, 2022

Has --skip-build been removed from SwiftPM? Is this in 5.7, or on the main branch?

EDIT: I see this is 5.8

@adam-fowler adam-fowler changed the title Test Discovery Error Test Discovery Error (Swift 5.8) Aug 21, 2022
@adam-fowler
Copy link
Contributor

It appears you cannot skip the build when listing tests. See swiftlang/swift-package-manager#5739

@adam-fowler adam-fowler added the SwiftPM Swift Package Manager label Sep 15, 2022
@adam-fowler
Copy link
Contributor

@compnerd this PR should fix the issue swiftlang/swift-package-manager#5770. Once it is merged can you test?

@compnerd
Copy link
Member Author

Hmm, there are a few more changes to LSP that I would prefer not to lose, but hopefully should be able to get those up in a day or so. Once they are up, we should be able to do a one-off build with the requisite patches and I should be able to test that.

@adam-fowler
Copy link
Contributor

No worries, in your own time

@adam-fowler
Copy link
Contributor

This is fixed with latest Swift trunk development build

@compnerd
Copy link
Member Author

The test listing does work ... kinda. It doesn't show up after a build directly, but if I did a "run all tests" it showed up, though didn't run the tests. It doesn't seem to be as reliable about running the tests as before though. Not sure what is going on just yet.

@adam-fowler
Copy link
Contributor

If you have no tests listed when you do a "run all tests" it will not run any tests (as you have none listed). But at the same time this completes a build which would then populate the test list.

I verified on linux that the test list is updated after a build has completed. I haven't had time to set up a new Windows VM to verify on Windows. The other one expired.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working SwiftPM Swift Package Manager
Projects
None yet
Development

No branches or pull requests

2 participants