Comments (6)
Out of the box and to manually configure a tradeoff
In order to meet the user's ease of use, I tried to add an automatic download function.
All code in the plugin is open source, public, and auditable. The binaries source URL is also pointing to the author's release page.
But yours is a good suggestion
Before the automatic download, we can add the user approval process and add the hash check of the downloaded file.user can choose auto download or manual download and config.
from vs-shell-format.
Bug: Detecting existing
shfmt
The logic to identify if
shfmt
is available on local machine/path is broken - it didn't detect the installed/available version ofshfmt
on the system.I understand what this extension is trying to do (make it easy for this extension to work), but its breaking some cardinal security rules. Implementing some of the safety check (checksum executable) would not change this - extensions shouldn't source arbitrary binaries.
In order to ensure that the version of the binary file is upgraded with the plugin, the future version will not check the PATH. If you need to specify it manually, you can configure the shellformat.path
and specify the version update in the changelog.
from vs-shell-format.
On the positive side, placing within extension folder is at least reasonable place to store it (as opposed to system bin). This is a reasonable compromise.
I would strongly suggest taking advantage of established paradigms (e.g. $PATH), but I understand you are seeing shfmt
is not widely available on user systems and they are complaining about the extension not working. Frustrating to read those reviews.
Something to think about - Which are you building?
- package manager's functionality within VS Code extension (but only for one package)?
- extension to hook up
shfmt
to VS Code?
Closing this issue - I think existing behavior is inline with other VS Code extensions (including Microsoft's Azure extensions - they also download binaries, but they do own/build them)
from vs-shell-format.
I also tried to package the files into the plugin and package them into different plugins according to different platforms, but vscode does not have such a mechanism.
from vs-shell-format.
package the files into the plugin...into different plugins according to different platforms
vscode does not have such a mechanism.
You wouldn't want to do that. Taking advantage of a concept like $PATH is one way that would allow you to maintain one extension that would work on various operating systems and environments. This allows you as the extension developer to focus on the extension, and operating system developers to focus on integrating a functioning $PATH (or whatever concept you utilize to achieve portability across platforms).
If you go esoteric, you might find people running VS Code on atypical architectures: ARM, within a browser, or remote shell sessions - its nice if extension works in all those scenarios.
That being said, I have seen a major multi-million (billion?) invested architecture (e.g. ARM) have a global total of less than 10 active users.... So I wouldn't be too focused on being that portable.
from vs-shell-format.
thanks suggest
from vs-shell-format.
Related Issues (20)
- quoting issues using the formatter
- Possible Issue - shfmt on Windows does not Format CRLF Files HOT 1
- Scripts and startup files (no `.sh` suffix) are not supported. HOT 3
- Windows Batch HOT 1
- Bundle full changelog with your extension HOT 2
- Antivirus issue
- .env file lost syntax highlighting HOT 1
- all_proxy is a invalid var name
- parameter expansion requires a literal
- IntelliSense Optimization
- Bug: case HOT 1
- Command arguments are being indented at the same level as the parent HOT 1
- VSCodium Marketplace
- Trailing slashes removed in Dockerfile RUN command HOT 2
- pls update bundled `shfmt` from 3.6 to 3.8
- [BUG]: unclosed here-document error on windows but not darwin HOT 1
- The syntax checking for .gitignore is incorrectly reporting errors.
- Error "Effective shfmt flags: "
- Do not steal focus when installing shell format binary
- Formatter adds spaces to option blocks in gitignore
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 vs-shell-format.