Skip to content
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

Build should fail if there are multiple lsp jars #148

Open
cmnrd opened this issue Jan 31, 2024 · 4 comments
Open

Build should fail if there are multiple lsp jars #148

cmnrd opened this issue Jan 31, 2024 · 4 comments
Labels
enhancement New feature or request

Comments

@cmnrd
Copy link
Contributor

cmnrd commented Jan 31, 2024

When I run npm install on the current master, then the resulting lib directory is empty. Consequently, the generated *.vsix is broken and the extension cannot start the language server. I also noticed that the resulting extension is called vscode-lingua-franca-0.5.1.vsix despite the recent 0.6.0 release.

@cmnrd
Copy link
Contributor Author

cmnrd commented Jan 31, 2024

Now I noticed the error message in npm's output:

Error: Multiple matches to /home/cmenard/projects/lf/vscode-lingua-franca/lingua-franca/lsp/build/libs/lsp-+(?).+(?).+(?)?(-SNAPSHOT)-all.jar were found. Please delete the jars that you do not want to use.
    at copyJar (/home/cmenard/projects/lf/vscode-lingua-franca/src/build_lds.ts:48:15)
    at build (/home/cmenard/projects/lf/vscode-lingua-franca/src/build_lds.ts:130:9)

I deleted the jars and now it works fine.

Would be great if npm actually fails if there is an error.

@cmnrd
Copy link
Contributor Author

cmnrd commented Jan 31, 2024

The created artifact is still called vscode-lingua-franca-0.5.1.vsix

@lhstrh lhstrh added the invalid This doesn't seem right label Jan 31, 2024
@lhstrh
Copy link
Member

lhstrh commented Jan 31, 2024

Just tried to reproduce, but it works just fine on my end. Did you pull the latest and updated submodules recursively?

image

@cmnrd cmnrd changed the title Manual build appears to be broken Build should fail if there are multiple lsp jars Feb 1, 2024
@cmnrd
Copy link
Contributor Author

cmnrd commented Feb 1, 2024

Ok, looks like something went wrong when I pulled. I had not checked out the latest main before... Sorry for the noise!

So this issue breaks down to npm not failing in case there are multiple lsp jars. While it prints

Error: Multiple matches to /home/cmenard/projects/lf/vscode-lingua-franca/lingua-franca/lsp/build/libs/lsp-+(?).+(?).+(?)?(-SNAPSHOT)-all.jar were found. Please delete the jars that you do not want to use.
    at copyJar (/home/cmenard/projects/lf/vscode-lingua-franca/src/build_lds.ts:48:15)
    at build (/home/cmenard/projects/lf/vscode-lingua-franca/src/build_lds.ts:130:9)

This is easily missed as the overall build succeeds.

@lhstrh lhstrh added enhancement New feature or request and removed invalid This doesn't seem right labels Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants