curl https://sh.rustup.rs -sSf | sh
Restart shell to get $HOME/.cargo/bin in PATH, then did: cargo install difftastic
And ~4 minutes later, difft executable is ready.Agree though that some pre-built binaries would be fantastic!
It's considered really sloppy and unmaintainable to admin a system like that. Things quickly get out of hand.
That strategy _does_ work if you isolate it to a chroot or a container, but littering /usr/local with all sorts of locally compiled upstream is just asking for future pain. Security updates, library incompatibilities, &c.
Prebuilt binaries might be nice, but I don't expect them for random projects. (and I wouldn't have used them if offered) I do think it's a reasonable expectation to be able to build software w/o essentially setting up a new userland just for that tool though. :)
I'm sorry, and retract my ignorant assumption! Going to try it out now.
I've also had requests from Alpine Linux packagers to allow dynamic linking to parsers. This is something I want to support in future, once I'm happy with the basic diffing logic.
https://doc.rust-lang.org/reference/linkage.html#static-and-...
spinned up a Ubuntu 18.04 instance -> git clone, git checkout 0.24.0
installed rust using curl | sh method
build fails:
removed the instance and gonna check it again 6 months later
= note: /usr/bin/ld: cannot find Scrt1.o: No such file or directory
/usr/bin/ld: cannot find crti.o: No such file or directory
Have you tried googling for "ubuntu crti.o: No such file or directory" ?Depending on the project, there is a certain threshold of trying-to-make-something-work which I'm willing to undertake in order to test an app.
But you are right. I'm sorry if my OG comment may come arrogant to the devs who do stuff for free. (♥ to the devs)
[edit]: ok, I tried again, `sudo apt update && sudo apt install build-essential` before installing rust and `cargo install`ing.
Error again:
vendor/tree-sitter-haskell-src/scanner.cc $ cat /usr/local/bin/difftastic
#!/bin/sh
source $HOME/.nix-profile/etc/profile.d/nix.sh
nix run nixpkgs.difftastic -c difftastic "$@"
and then it'll install on first run: $ difftastic
these paths will be fetched (1.17 MiB download, 9.38 MiB unpacked):
/nix/store/wn74xn0w60xcwsly6nqaibn205hh2qms-difftastic-0.8
copying path '/nix/store/wn74xn0w60xcwsly6nqaibn205hh2qms-difftastic-0.8' from 'https://cache.nixos.org'...
Difftastic 0.8.0
Wilfred Hughes
A syntax aware diff.
USAGE:
[etc.]Edit: Reinstalling Cargo worked!
It'll confirm that you want to install it, because it's already installed I think, and I just selected 1. for Yes.
hard pass :)
Why? You're willing to run some random open source project, but you're not willing to run the official Rust installation script?
Even if this specific instance of curl'ing into sh is safe, or if I download and then run it, it's still extremely poor practice and gives me serious doubts about the developers and their security practices in general.
I also do not like when every project decides to poorly reimplement the package manager. If every software used it's own package manager my system would be a complete mess with dozens of different package managers fighting each other and it would be a total nightmare to update the system or manage non-trivial dependency chains when installing something new.
Rust is one of my favorite languages but this is definitely my least favorite aspect of it all. It really feels like the developers "optimized" for systems with no package manager.
A get started guide with all the required commands easily copy-pastable? (A popular option these days) Something else?
I don’t mean to be critical, I’m simply curious.
Also, `cargo install difftastic` AIUI pulls it from a central location, if I'm gonna poke at software for the first time, I enjoy building it myself first, so I can get my hands dirty in the source. :)
EDIT: Also, the build fails. :(
"error: unexpected token: `include_str` --> /home/loxias/.cargo/registry/src/github.com-1ecc6299db9ec823/radix-heap-0.4.2/src/lib.rs:2:10 | 2 | #![doc = include_str!("../README.md")] | ^^^^^^^^^^^
error: aborting due to previous error
error: could not compile `radix-heap`.
sad trombone
I've documented the minimum rust version required today, although I'm looking at lowering the minimum version.
Edit: And after installing cargo, watching it fail to build, then determining I must need a newer version of cargo, so I built that from source... it fails. Apparently I need to install `rustc-mozilla` and not `rustc`. "obviously".
This is all a testament to how much I want to try this tool...
MOAR EDIT: even with rustc-mozilla cargo fails to build. running `cargo install difftastic` gives me an error about my version of cargo being too old ;.;
Dear author: Let us run your tool.