Commit Graph

39 Commits

Author SHA1 Message Date
Ilya Grigoriev
d3428d63a2 nix: Add poetry to devDependencies for nix develop
This should allow Nix users to build the documentation in
`nix develop` following the instructions in `contributing.md`.

It feels a little weird to add a package manager and ask
people to use it inside nix, but I think it's simpler
than having two sets of instructions and dependencies
to maintain.
2023-08-28 10:43:48 -07:00
Austin Seipp
688029428b backout of commit e212e10dee
Summary: mold apparently breaks linking to several external libraries, meaning
that the `jj` binary is useless as it can't load e.g. `libgit2.so` -- but
somehow I didn't catch it. Backout until a solution can be pinpointed. We can at
least give off a sigh of relief knowing that our link times aren't too bad yet.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Change-Id: I6e1851c339ddc72d32c201a44a7ddc49
2023-08-04 17:38:31 -05:00
Austin Seipp
8cb429d065 chore(rust): bump MSRV to 1.71.0
Summary: Let's be more aggressive about tracking the latest stable Rust release.
There's little benefit to being conservative so early on, especially when no
users seem to have faced any issue with upgrading, or strictly required an old
Rust version.

Right now, just lagging Rust by 1 major release probably seems fine. We're
targeting 1.71.0 to get ahead of the curve, since 1.72.0 will likely release
sometime before the next `jj` release.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Change-Id: I4e691b6ba63b5b9023a75ae0a6917672
2023-07-17 18:38:26 -05:00
Austin Seipp
e212e10dee feat(nix): use mold by default for linking inside 'nix develop'
Summary: Pure QOL improvement, not that this was too awful as it stood. But this
ultimately makes all builds faster, effectively for free; on my Linux machine,
debug link time for jj-cli goes from 3s to 1s.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Change-Id: I5a0d516363635710733e8bee8f208050
2023-07-14 20:29:16 -05:00
Martin von Zweigbergk
152a0683e2 github: enable the watchman feature in pre-built binaries 2023-07-12 17:51:38 +01:00
Austin Seipp
cd4637e51c feat(nix): enable watchman support in nix package
Summary: Nix packages tend to come "full extra pack of batteries"-included, so
adding watchman support makes sense. I'll also want it for my own experiments.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Change-Id: Ia99757bf7a39814529525efe423d527b
2023-07-10 16:05:53 -05:00
Austin Seipp
f1e09e3f3f chore(github): reduce compile time in build, nix, and release workflows
Summary: When building in CI, we just build everything from scratch in the `dev`
profile, so just turn off debuginfo and incremental compilation data. These
aren't reused, but more importantly take up more space and CPU time to generate;
that's more expensive on slower machines and when using The Cloud(TM) to build.

Together, these take a fresh build (`rm -rf target/` ahead of time) from about
40s to 30s on my machine.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
Change-Id: Id6e706634dbaf88f6ccd7f457409ad7c
2023-07-10 06:18:38 -05:00
Anton Bulakh
83dd591272 nix: dont install fake binaries and fix dirty jj version 2023-06-25 00:58:13 +03:00
Benjamin Saunders
19a2f2194d nix: remove unnecessary dependencies 2023-05-07 06:56:09 -07:00
Benjamin Saunders
17be937e3d nix: use packaged foreign dependencies in dev shell 2023-05-06 06:08:35 -07:00
Benjamin Saunders
cfadc50cb2 nix: use packaged builds of foreign dependencies
Speeds up the build and reduces the size of the resulting package.
2023-05-05 10:57:18 -07:00
Martin von Zweigbergk
92a911b7a3 cli: rename jj support to jj util
I wasn't quite happy with `jj support` but I couldn't think of
anything better when I moved the commands from `jj debug` in
e2b4d7058d. Thanks to @ilyagr for suggesting `jj util`.
2023-04-12 21:34:47 -07:00
Martin von Zweigbergk
68fb46b2af op_store: drop support for upgrading from Thrift implementation 2023-03-30 20:00:33 -07:00
Anton Bulakh
3c68cfa737 nix: fix shell completions 2023-03-22 06:20:15 +02:00
Martin von Zweigbergk
2495c8f27e cargo: update MSRV to 1.64
We need 1.64 to bump `clap` to `4.1`. We don't really need to upgrade
to that, but being on an older version causes minor confusions like
#1393. Rust 1.64 is very close to 6 months old at this point.
2023-03-17 22:44:29 -07:00
Martin von Zweigbergk
e2b4d7058d cli: move some debug commands to new (non-hidden) support group
The `jj debug` commands are hidden from help and are described as
"Low-level commands not intended for users", but e.g. `jj debug
completion` is intended for users, and should be visible in the help
output.
2023-03-17 06:50:55 -07:00
Michael Forster
567a05d7ec nix: use default list of systems
Most notably this removes the `i686-linux` target, which wasn't added
deliberately and is also not tested.
2023-01-28 07:10:12 +01:00
Michael Forster
3ca26974e6 nix: filter source files
This speeds up the nix build by reducing the number of files that are copied to
the nix store.

Hopefully fixes #1095.
2023-01-28 07:10:12 +01:00
Michael Forster
29db607e10 nix: replace manual system iteration by flake-utils
Let's not reinvent the wheel. This makes the flake more readable, and also would
detect typos in the system list.
2023-01-28 07:10:12 +01:00
Michael Forster
3c0eb21ed1 nix: refactor flake to avoid building jj for the dev shell
We don't actually need `jj` itself in the development shell. But having it in
the overlay significantly increases the time it takes to build the shell.
2023-01-28 07:10:12 +01:00
Martin von Zweigbergk
0b99e5b16e graphlog: enable Sapling's graph styles by default
I would also rename the feature, but I hope we can instead soon make
it a non-optional dependency and delete the feature.
2023-01-27 09:46:57 -08:00
Martin von Zweigbergk
e46cbfc9d0 cargo: replace dependency on Sapling's dag by renderdag
The rendering is now its own crate, so we don't need to depend on the
other `dag` code.

Fixes #1056.
2023-01-22 00:03:48 -08:00
Mike Forster
c6a4b2cdfc Also update MSRV in flake.nix
This got lost in an unfortunate merge.

Apparently I need to learn better how to use `jj` properly.
2023-01-19 11:03:36 +01:00
Michael Forster
536ac87b11 Configure nix development shell environment
This gets used by `nix develop`, or automatically by `direnv` if you have it
installed.

The binary versions are pinned to the versions recommended by `contributing.md`.

```
>> cargo --version
cargo 1.60.0 (d1fd9fe 2022-03-01)

>> rustc --version
rustc 1.60.0 (7737e0b5c 2022-04-04)

>> cargo fmt --version
rustfmt 1.5.1-nightly (3984bc5 2023-01-17)

>> cargo clippy --version
clippy 0.1.60 (7737e0b 2022-04-04)
```
2023-01-19 06:45:50 +01:00
Michael Forster
0ddf550369 Configure a formatter for Nix.
I've choosen nixpkgs-fmt because it's the one whose output is most similar to
the current style.
2023-01-19 06:45:50 +01:00
Benjamin Saunders
e63818998d cargo: specify explicit rev for git dep on dag 2023-01-16 21:37:19 -08:00
Michael Forster
073505fc8e Add sapling graph formatters as an option. 2023-01-16 22:15:55 +01:00
Michael Forster
3bd0c50090 Fix nix run
Otherwise nix 2.8 and newer will give this error message:

```
>> nix --version; nix run github:martinvonz/jj
nix (Nix) 2.11.1
error: attribute 'defaultApp.x86_64-linux' should have type 'derivation'
```
2023-01-13 15:40:31 -08:00
Martin von Zweigbergk
dfde44255c cargo: depend on now-released thrift 0.17.0
This should let us publish our crates to crates.io.
2022-12-05 20:50:48 -08:00
Pranay Sashank
d9f1ada69a Add legacy-thrift feature to nix flake. 2022-12-06 00:05:46 +05:30
Martin von Zweigbergk
4ee261717e simple_op_store: replace Protobuf by Thrift
As mentioned in the previous commit, we need to remove the Protobuf
dependency in order to be allowed to import jj into Google's
repo. This commit makes `SimpleOpStore` store its data using Thrift
instead of Protobufs. It also adds automatic upgrade of existing
repos. The upgrade process took 18 s in my repo, which has 22k
operations. The upgraded storage uses practically the same amount of
space. `jj op log` (the full outut) in my repo slowed down from 1.2 s
to 3.4 s. Luckily that's an uncommon operation. I couldn't measure any
difference in `jj status` (loading a single operation).
2022-11-13 11:39:33 -08:00
Georges Dubus
5b5a85fe33 Change pkgconfig to pkg-config
`pkgconfig` has been a alias to `pkg-config` since 2021-01-18, and has started being an error since 2022-09-24.

This commit makes recent nixpkgs versions work, but might make version older than January 2021 break (which is probably not an issue).
2022-09-29 17:56:06 -07:00
Martin von Zweigbergk
cac93e2793 cargo: use libgit2 with vendored OpenSSL (#73)
I was able to build a working musl binary with this change, by running
this command:

```
cargo build --release --target x86_64-unknown-linux-musl
```

Thanks to @arxanas for the tip.
2022-03-13 21:34:07 -07:00
Cole Mickens
2a6ab8b6fc nix: add manpages, completion to output 2022-03-02 08:46:54 -08:00
Jelle Besseling
54a6adf47a
Remove rust nightly overlay 2022-02-21 18:14:48 +01:00
Jelle Besseling
9fb580b6ee
Add nix installation instructions 2022-02-20 22:53:04 +01:00
Jelle Besseling
e25752c746
Add updateToolchainManifest explanation 2022-02-20 21:56:52 +01:00
Jelle Besseling
f8ef71cfa7
Fix program name 2022-02-20 21:49:15 +01:00
Jelle Besseling
50b8357234
Add flake.nix 2022-02-20 21:30:05 +01:00