Commit Graph

116 Commits

Author SHA1 Message Date
Rebecca Turner
7b92b595c9
Add devshell helper (#378) 2023-09-03 10:33:10 -07:00
Ivan Petkov
ecf151658e
cargoDoc: do not install cargo artifacts by default (#381)
* Also install generated docs
2023-09-03 10:29:13 -07:00
Rebecca Turner
174604795d
Add workaround for cargo-nextest bug (#376)
Prevents this error:

```
(...)
dyld: Library not loaded: @rpath/libtest-77ee8c29c330e4a3.dylib
  Referenced from: /private/tmp/holochain_repo/target/fast-test/deps/hdk_derive-73ec051829ad694a
  Reason: image not found
error: creating test list failed
Caused by:
  for `hdk_derive::proc-macro/hdk_derive`, running command `/private/tmp/holochain_repo/target/fast-test/deps/hdk_derive-73ec051829ad694a --list --format terse` failed
Caused by:
  command ["/private/tmp/holochain_repo/target/fast-test/deps/hdk_derive-73ec051829ad694a", "--list", "--format", "terse"] exited with code <signal 6>
Error: Process completed with exit code 104.
```

https://github.com/nextest-rs/nextest/issues/267
2023-08-30 23:44:00 +00:00
Ivan Petkov
43db881168
various: change cargoExtraArgs defaults to include --locked (#373) 2023-08-27 19:17:58 +00:00
Ivan Petkov
ef5d11e3c2
Update CHANGELOG 2023-08-22 17:26:23 -07:00
Ivan Petkov
7809d36971
downloadCargoPackageFromGit: resolve symlinks in crate directory (#367) 2023-08-12 01:26:37 +00:00
Leonardo Eugênio
1b8653ad52
Trunk: use native dart-sass (#360)
Replace the javascript version of dart-sass with a native binary version.
Should improve built times and reduce disk usage.

---------

Co-authored-by: Ivan Petkov <ivanppetkov@gmail.com>
2023-08-11 00:38:14 +00:00
Ivan Petkov
b5d9d42ea3
README: fix headings 2023-08-07 08:46:02 -07:00
Ivan Petkov
6c25eff4ed
Update CHANGELOG 2023-08-07 08:42:56 -07:00
Ivan Petkov
8b08e96c9a
inheritCargoArtifactsHook: fix doNotLinkInheritedArtifacts handling (#357)
* This ensures that when doNotLinkInheritedArtifacts is set, artifact
  symlinks are deeply resolved
2023-07-07 23:28:38 +00:00
Hung Tran
4d350bb94f
deps: update cargo-utils dependencies, should fix builds from nightly rust (#346)
---------

Co-authored-by: htran <htran@egihosting.com>
2023-06-29 16:51:22 -07:00
Ivan Petkov
116b32c30b
inheritCargoArtifactsHook: allow disabling symlink behavior (#345) 2023-06-21 01:13:46 +00:00
Ivan Petkov
bd65e0e473
inheritCargoArtifactsHook: symlink dependency rlib and rmeta files (#344)
* cargoTarpaulin: do not clean by default

---------

Co-authored-by: Philipp Mildenberger <philipp@mildenberger.me>
Co-authored-by: Philipp Mildenberger <philipp.mildenberger@artfabrik.at>
2023-06-19 21:50:17 +00:00
Roman Volosatovs
9f6e7286c5
fix: do not install bindep artifacts by default (#298)
- Add support for installing crates utilizing `bindeps` feature
by only installing binaries of workspace packages

---------

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
Co-authored-by: Ivan Petkov <ivanppetkov@gmail.com>
2023-06-18 23:41:59 +00:00
James Baker
75f7d715f8
Natively support sparse registries (#324)
With Cargo 1.68.0, sparse registries were made stable. With sparse
registries, index metadata is stored in an HTTP api rather than in
a git repository.

As relevant to Crane, the relevant changes are mostly that registries
do not always start with `registry+` and mostly start with `registry+`
or `sparse+` depending on whether the registry is sparse or not.

This PR adjusts the core of Crane to differentiate between `registry`
and `sparse`, and adds a new sparse registry factory to make things
easy.

---------

Co-authored-by: Ivan Petkov <ivanppetkov@gmail.com>
2023-06-13 02:03:18 +00:00
Ivan Petkov
057d95721e
Add support for installing dylib crate types (#340)
---------

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
Co-authored-by: Roman Volosatovs <rvolosatovs@riseup.net>
2023-06-08 01:00:25 +00:00
Ivan Petkov
f31931d6f8
Update support to nixos-23.05 (#339)
Dropping support for nixos-22.11
2023-06-08 00:15:38 +00:00
Uosis
3acc7230ee
Clean install hooks from buildDepsOnly invocation (#334)
---------

Co-authored-by: Ivan Petkov <ivanppetkov@gmail.com>
2023-06-07 05:38:53 +00:00
Quentin
bff08cbecc
fix(Trunk): Set the wasm-opt version as expected by Trunk (#338)
Trunk expect a version number with this specific format: "version_{num}"
2023-06-06 20:54:50 -07:00
Ivan Petkov
8ab1a49432
Update CHANGELOG 2023-06-06 20:35:16 -07:00
Leonardo Eugênio
35110cccf2
fix: Strip store references in buildTrunkPackage (#330)
The output of buildTrunkPackage should never have runtime dependencies.
Not only are they redundant but they also increase the closure greatly.
2023-05-25 02:17:57 +00:00
Antti Keränen
99de890b6e
Keep "resolver" when cleaning Cargo.toml (#327)
For projects using version != 2021 and resolver = 2, the resolver
information needs to be kept or otherwise the dependency build might
fail.

---------

Co-authored-by: Ivan Petkov <ivanppetkov@gmail.com>
2023-05-18 21:03:02 -07:00
Leonardo Eugênio
db21a44eb0
Trunk support (#299)
[Trunk](https://trunkrs.dev) is a tool that allow you to build web apps
using Rust and webassembly, including compiling scss, and distributing
other assets.

Adds `craneLib.buildTrunkPackage`, a function that builds a Trunk
project returning a directory with the resulting dist files for that
project

---------

Co-authored-by: Ivan Petkov <ivanppetkov@gmail.com>
2023-04-29 12:34:39 -07:00
Ivan Petkov
0c9f468ff0
buildPackage: don't inherit installPhase when calling buildDepsOnly (#297) 2023-04-11 01:37:58 +00:00
Ivan Petkov
445a3d2229
Update CHANGELOG 2023-04-10 18:16:16 -07:00
Ivan Petkov
f491bee4f9
Add support for building standard library crates (#287)
* vendorCargoRegistries: accept `registries` from the caller if specified
* Add vendorMultipleCargoDeps
2023-04-02 17:57:17 +00:00
Ivan Petkov
ec69da6973
vendorCargoDeps: skip checking for cargoConfigs if src not set (#278) 2023-03-22 04:57:14 +00:00
Ivan Petkov
2552a2d1cc
Update CHANGELOG 2023-03-19 21:15:09 -07:00
Ivan Petkov
141943d26a
docs: replace references to lib with craneLib (#274)
* `lib` is already a common import representing `pkgs.lib`
* Consistently using `craneLib` in the docs and examples will ensure
  better clarity
2023-03-20 04:13:23 +00:00
Ivan Petkov
6fd78bc66a
Add path as a convenience wrapper around builtins.path (#273) 2023-03-19 20:57:15 -07:00
figsoda
77435dad14
feat: add cargoLockParsed option (#270)
---------

Co-authored-by: Ivan Petkov <ivanppetkov@gmail.com>
2023-03-20 00:33:17 +00:00
figsoda
475de74fa2
feat: add cargoLlvmCov (#267)
* feat: add cargoLlvmCov
* cargoHelperFunctionsHook: prefer `--release` over `--profile release`
Some tools (e.g. cargo-llvm-cov) don't understand `--profile release` as
an alias for `--release`, so `cargoWithProfile` should prefer passing
`--release` when `$CARGO_PROFILE` == "release"

---------

Co-authored-by: Ivan Petkov <ivanppetkov@gmail.com>
2023-03-19 23:44:14 +00:00
Roman Volosatovs
56b875b6eb
fix: target workspace dependency resolution (#265) 2023-03-19 12:47:29 -07:00
Roman Volosatovs
5291dd0aa7
feat: add support for bindeps feature (#258)
Write a `main.rs` to `src/bin/dummy` within the generated dummy source,
rather than `src/main.rs` to account for `illegalBin` test case

Signed-off-by: Roman Volosatovs <rvolosatovs@riseup.net>
2023-03-06 17:24:21 -08:00
Ivan Petkov
953b70da28
Update CHANGELOG 2023-02-19 14:46:28 -08:00
Ivan Petkov
d777dbc167
mkDummySrc: avoid invalidation if the source name has two hashes (#248) 2023-02-19 22:43:11 +00:00
Ivan Petkov
34633dd0d7
buildDepsOnly: warn if both src and dummySrc are set (#247) 2023-02-19 17:46:57 +00:00
Ivan Petkov
6fb400ec63
crateNameFromCargoToml: warn when values can't be found (#237) 2023-02-12 00:39:43 +00:00
Ivan Petkov
c6b5c57cfb
Update CHANGELOG 2023-02-11 15:46:00 -08:00
Felix Schröter
2b866abbdd
ignore non-json lines in cargoBuildLog (#234)
Fixes issues with non-json values in cargoBuildLog: rust-lang/cargo#8179
---------

Co-authored-by: Ivan Petkov <ivanppetkov@gmail.com>
2023-02-11 13:27:11 -08:00
Ivan Petkov
ccea7b3317
Update CHANGELOG 2023-01-21 16:50:49 -08:00
Ivan Petkov
00564437f3
Properly handle workspace inheritance in git dependencies (#224)
Crates from git repos are vendored in a flattened directory where each crate shows up at the root of the vendor directory. Since the vendoring step effectively breaks workspace structures, any crates which use workspace inheritance (e.g. package.version.workspace = true will fail to resolve.

To work around this we inspect the crate's workspace manifest (if it exists) and attempt to manually merge the values while copying the contents to the vendor directory.
2023-01-21 16:46:32 -08:00
Ivan Petkov
42e2fab6bc
Make it easier to build workspaces not at source root (#212) 2023-01-05 04:46:43 +00:00
Ivan Petkov
18ef99b1e0
inheritCargoArtifactsHook: preserve executable bit of build scripts (#206)
Using `cp --no-preserve mode` ends up losing the executable bit of
previously compiled build scripts. Instead we should ignore the file
ownership, and subsequently make the files writable (since the store is
read only)
2023-01-04 02:53:38 +00:00
Ivan Petkov
98894bb39b
Update CHANGELOG 2022-12-26 15:01:01 -08:00
Ivan Petkov
70fcce8db0
mkDummySrc: try to use the same output name as original source (#190) 2022-12-20 20:50:22 -08:00
Ivan Petkov
63f80ee278
zstd: use as many threads as we can when compressing (#183) 2022-12-09 00:44:41 +00:00
Ivan Petkov
ea271bdc05
ci: test against 22.11 and stop testing 22.05 (#179) 2022-12-01 20:12:55 -08:00
Ivan Petkov
fb80a689c5
Update CHANGELOG 2022-12-01 17:08:20 -08:00
Ivan Petkov
2b0be4c1c4
mkDummySrc: work with uefi targets by default, and allow downstream customization (#174)
* mkDummySrc: also include `no_std` attrs for target_os = uefi
* buildDepsOnly: only check with `--all-targets` if doCheck enabled
* mkDummySrc: allow customizing dummy Rust file contents
2022-11-28 03:23:35 +00:00