Comments (10)
Wohoo π :
npm install microsoft-compose-language-service-0.1.3-alpha.tgz
added 7 packages, and audited 8 packages in 620ms
found 0 vulnerabilities
And then:
~/node_modules/\@microsoft/compose-language-service/bin/docker-compose-langserver --stdio
Seems to be running :-)
from compose-language-service.
@bwateratmsft : I know the ticket is closed but I wanted to let you know everything seems to be working fine.
The main two places (here and here) are way simpler now and they seem to work.
Thanks a ton for the quick response and the solution!
from compose-language-service.
Thanks @marcdeop! This is an interesting idea. Are there other language services that are already doing this, that I could use as a reference?
from compose-language-service.
From the top of my head:
docker-anguage-server-nodejs
yaml-language-server
vim-language-server
Hopefully is enough to give you an idea :-)
from compose-language-service.
@marcdeop can you npm install
the build for the PR? It's available here: https://dev.azure.com/ms-azuretools/AzCode/_build/results?buildId=58272&view=artifacts&pathAsName=false&type=publishedArtifacts. The download will come as a .ZIP which you can extract, and then do npm install /path/to/microsoft-compose-language-service-0.1.3-alpha.tgz
. I think that's all these executables are supposed to be.
If that does work, I'll bump the version and release.
from compose-language-service.
So... a few issues:
npm install microsoft-compose-language-service/microsoft-compose-language-service-0.1.3-alpha.tgz
npm ERR! code 128
npm ERR! An unknown git error occurred
npm ERR! command git --no-replace-objects ls-remote ssh://[email protected]/microsoft-compose-language-service/microsoft-compose-language-service-0.1.3-alpha.tgz.git
npm ERR! ERROR: Repository not found.
npm ERR! fatal: Could not read from remote repository.
npm ERR!
npm ERR! Please make sure you have the correct access rights
npm ERR! and the repository exists.
npm ERR! A complete log of this run can be found in:
npm ERR! /home/marc.deop-private/.npm/_logs/2023-02-13T20_15_20_345Z-debug-0.log
So I tried unpacking also the .tgz and running npm install
inside.
The resulting file is not executable:
bin/docker-compose-langserver
-bash: bin/docker-compose-langserver: Permission denied
Nothing a chmod a+rx bin/docker-compose-langserver
cannot fix.
Now:
./bin/docker-compose-langserver
/usr/bin/env: βnode\rβ: No such file or directory
/usr/bin/env: use -[v]S to pass options in shebang lines
Now I am confused π
EDIT:
I converted the file to unix format with dos2unix bin/docker-compose-langserver
and now it executes but:
node:internal/modules/cjs/loader:998
throw err;
^
Error: Cannot find module '../lib/server'
Require stack:
- /home/marc.deop-private/tmp/compose-language-service/bin/docker-compose-langserver
at Module._resolveFilename (node:internal/modules/cjs/loader:995:15)
at Module._load (node:internal/modules/cjs/loader:841:27)
at Module.require (node:internal/modules/cjs/loader:1061:19)
at require (node:internal/modules/cjs/helpers:103:18)
at Object.<anonymous> (/home/marc.deop-private/tmp/compose-language-service/bin/docker-compose-langserver:6:1)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
at Module.load (node:internal/modules/cjs/loader:1037:32)
at Module._load (node:internal/modules/cjs/loader:878:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) {
code: 'MODULE_NOT_FOUND',
requireStack: [
'/home/marc.deop-private/tmp/compose-language-service/bin/docker-compose-langserver'
]
}
Node.js v18.12.1
from compose-language-service.
I think I know what happened; Git is surreptitiously adding \r
in and it's causing problems. I've seen that happen before. I have a new build that should fix that part, at least: https://dev.azure.com/ms-azuretools/AzCode/_build/results?buildId=58275&view=artifacts&pathAsName=false&type=publishedArtifacts
The install failure is, I'm guessing, due to the weird stuff we have to do with namespacing to get it to play nice with NPM. Once it's published that shouldn't be an issue but I guess for testing you'll have to extract like you did π
I also added the bin
entry to package.json
which I'd forgotten to do before. I don't know for sure but that may (or may not) fix the permissions issue so chmod
isn't needed.
from compose-language-service.
Interestingly, I was able to npm install
the .tgz
file--as long as I was in the same folder as it, not a parent folder. No idea why that is...once I did the npm install
, it collects the necessary dependencies (e.g., vscode-languageserver
, yaml
, a few others) and seemed to work. Unpacking alone didn't work, though the error I got was different--missing vscode-languageserver
.
from compose-language-service.
Hey @marcdeop, I just published 0.1.3 on NPM with these changes. Let us know if it works!
from compose-language-service.
Awesome! Glad we could help!
from compose-language-service.
Related Issues (20)
- How to change environment variables to map syntax HOT 3
- How to disable telemetry for clients other than VSCode? HOT 1
- Deconfliction with YAML extension's language service
- Compose formatter: YAML anchors broken by formatting HOT 1
- Compose language service doesn't recognize `restart` option HOT 3
- Manually typing `services:` and Enter results in `services:configs:` HOT 1
- Docker compose files do not have autocomplete for "args:" HOT 5
- Docker Compose: Wrapping of Lines >80 characters HOT 5
- Map keys must be unique (DUPLICATE_KEY) on anchors HOT 1
- BAD_INDENT false positive if alias is used as mapping key in Docker Compose file HOT 4
- Idea: Snippets for some well-known services
- Idea: Suggest images based on data from Docker Hub
- Idea: Linting support for docker-compose.yml files HOT 14
- Idea: IntelliSense for selecting the correct file path in Volumes in Compose HOT 3
- Idea: Snippets for some well-known services (postgres, redis, etc.), including common ports HOT 1
- Idea: Image autocomplete suggestions HOT 1
- Recommendation if a user opens a compose file with Docker extension not installed HOT 2
- Formatting Docker Compose files removes the YAML document end HOT 17
- Improve UT fragility
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from compose-language-service.