Added std lib files into installer
Hello there,
For the LSP I need std lib files on the client machine, and not as a part of the compiler. I didn't touch Nix files as it is scientifically proven fact that it is black magic.
I think there can be a lot of edge cases, so any tests will be most welcome.
I've modified installation scripts install.ab/uninstall.ab/snapcraft.yaml and cargo-dist release pipeline to include std lib files.
Enjoy.
2 more things @Ph0enixKM I'd like to brirng in your account. I think the project needs a rename from amber to amber-bash, because
- You registered the snap name under
amber-bashwhich was a blessing in disguise. - Another project on Github has a copyright of the name
amberfrom 2012, (not an expert of such things, so, better to have some more expert opinions on this) - When one needs to run the snap, he'll need to run it as
amber-bashnotamber. Andamber-bashgives this output, which is misleading and needs to be fixed
Usage: amber [OPTIONS] [INPUT] [ARGS]... [COMMAND]
Commands:
eval Execute Amber code fragment
run Execute Amber script
check Check Amber script for errors
build Compile Amber script to Bash
docs Generate Amber script documentation
completion Generate Bash completion script
help Print this message or the help of the given subcommand(s)
Arguments:
[INPUT] Input filename ('-' to read from stdin)
[ARGS]... Arguments passed to Amber script
Options:
--no-proc <NO_PROC> Disable a postprocessor
Available postprocessors: 'shfmt', 'bshchk'
To select multiple, pass multiple times with different values
Argument also supports a wilcard match, like "*" or "s*mt"
-h, --help Print help
-V, --version Print version
I initially thought of alias, but due to this copyright, I am not sure we'll be able to get an alias to amber.
@soumyaDghosh This project that you shared is not being maintained 7 years now. It seems that it's something that they abandoned long time ago. I think that there is no problem with us sticking to the name "amber".
Quite frankly anyone could name their project "amber". But unless this name is not widely recognized in the shell scripting environment, I'd say it's still a good one.
You've mistaken copyright for trademark, @soumyaDghosh
How can we create an amber alias for amber-bash?
How can we create an
amberalias foramber-bash?
You just create a forum post requesting an alias, similar to this
Users can anyways create local aliases,
sudo snap alias amber-bash amber
I've decided that there are too many installer variations. It needs to be unified. Cargo dist is my pick as it compiles for macos, linux and windows on all architectures and offers easy updates. Packaging is also simple. I added config just for shell installer but homebrew is also an option
@KrosFire btw since Amber is already installed, can we write uninstaller in Amber itself?
@KrosFire btw since Amber is already installed, can we write uninstaller in Amber itself?
You're right
I love this uninstall sentence "see you later 🐊"
i strongly suggest that we discuss the change itself in #643 , and reserve this space for code review
why is there a lot of changes to CI? the description says that it is about moving stdlib onto the client machine
which hasn't been properly discussed, by the way
It's relavent because moving std lib to client machine involves changing installation process. CI is automatically generated by cargo dist.
@b1ek, please explain your concerns about the "irrelevant" parts of code. The snippet you said that are irrelevant from my point of view bring some value like for instance retrieving cached cargo-dist in a pipeline.
@b1ek, please explain your concerns about the "irrelevant" parts of code. The snippet you said that are irrelevant from my point of view bring some value like for instance retrieving cached
cargo-distin a pipeline.
i just don't understand why they have to be included in this PR specifically, as there is no info in the description about them.
they do provide some value, but the description doesn't say anything about them. so that's irrelevant the way i see it
I think that the Std files shouldn't be in the installer because a user maybe is not interested in the LSP.
The LSP server should include the std itself like other languages does.
I think that the Std files shouldn't be in the installer because a user maybe is not interested in the LSP.
The LSP server should include the std itself like other languages does.
But std lib files are included one way or the other. I just change the way they are included as to not have needless redundancy
@b1ek, please explain your concerns about the "irrelevant" parts of code. The snippet you said that are irrelevant from my point of view bring some value like for instance retrieving cached
cargo-distin a pipeline.i just don't understand why they have to be included in this PR specifically, as there is no info in the description about them.
they do provide some value, but the description doesn't say anything about them. so that's irrelevant the way i see it
Adding std lib files requires changing how we build release files. We do it with cargo-dist that automatically generates ci config. I changed configuration of cargo-dist - which is relevant, that change propagates into changes in CI file. I think this is relevant. Changing manually CI file to look the same as before is excessive imho
We do it with
cargo-distthat automatically generates ci config. I changed configuration of cargo-dist - which is relevant, that change propagates into changes in CI file
just put it in the description, to make it clear to everyone what it does and what is it for
@Mte90 many popular compilers include standard library installed separately (usually under /usr/lib) common example is GCC