Johannes Kirschbauer
38cd8da809
doc: migrate filesets to doc-comment format ( #303811 )
...
* doc: migrate filesets to doc-comment format
* fix definition list indentation
2024-05-20 23:12:31 -07:00
Philip Taron
4b2e46dd39
lib.fileset: fix typo: compatibity to compatibility
2024-04-02 14:46:59 -07:00
Silvan Mosberger
e3a6e38033
lib.fileset.toList: init
2024-02-26 20:21:50 +01:00
Silvan Mosberger
4a70c1e4da
lib.fileset.gitTracked: Support out-of-tree builds
2023-12-19 22:08:59 +01:00
Silvan Mosberger
eec765f9e6
lib.fileset: Refactor gitTracked and gitTrackedWith
...
Introduce an internal function for them to share more behavior.
This makes future changes easier.
2023-12-11 22:57:12 +01:00
Silvan Mosberger
7486aee82e
Merge pull request #266362 from tweag/fileset.fileFilter-ext
...
`lib.fileset.fileFilter`: Predicate attribute for file extension
2023-11-24 00:15:43 +01:00
Silvan Mosberger
6816f28c96
lib.fileset.fileFilter: Predicate attribute for file extension
2023-11-23 21:05:23 +01:00
Silvan Mosberger
1cc2c2f13d
lib.fileset.maybeMissing: init
2023-11-20 19:56:45 +01:00
Silvan Mosberger
4164b1c47e
lib.fileset: Re-order to match reference overview
2023-11-19 23:52:13 +01:00
Silvan Mosberger
13f0af428e
lib.fileset: Add overview section to reference docs
2023-11-19 23:46:23 +01:00
Silvan Mosberger
5a7118da75
Merge pull request #268520 from tweag/fileset-minor-changes
...
`lib.fileset`: Minor changes
2023-11-19 19:12:29 +01:00
Silvan Mosberger
b514f0433c
lib.fileset: Minor changes
...
- Make fromSource's missing file error message more consistent with others,
and add a test for it
- Indent some function arguments
- Fix an internal type
2023-11-19 16:06:14 +01:00
Silvan Mosberger
228df50ff9
lib.fileset: Move introduction section above the functions
...
Previously the introductory section and the function listings were in
different places. But now nixdoc supports having them together
with https://github.com/nix-community/nixdoc/pull/70 !
2023-11-19 15:00:57 +01:00
Silvan Mosberger
ada680bcfa
lib.fileset.gitTracked: Better error in pure eval
2023-11-16 14:42:26 +01:00
Silvan Mosberger
d33f1a62f5
lib.fileset.gitTrackedWith: Introduce recurseSubmodules parameter
2023-11-16 01:12:18 +01:00
Silvan Mosberger
2dfb1d36cf
lib.fileset.gitTracked/gitTrackedWith: init
...
A configuration parameter for gitTrackedWith will be introduced in the
next commit
2023-11-16 01:12:15 +01:00
Silvan Mosberger
1c3eb9eff1
lib.fileset.fileFilter: Restrict second argument to paths
...
While this change is backwards-incompatible, I think it's okay because:
- The `fileFilter` function is not yet in a stable NixOS release, it was only merged about [a month ago](https://github.com/NixOS/nixpkgs/pull/257356 ).
- All public uses of the function on GitHub only pass a path
- Any `fileFilter pred fileset` can also be expressed as `intersection fileset (fileFilter pred path)` without loss of functionality.
- This is furthermore pointed out in the new error message when a file set is passed
2023-11-15 01:20:36 +01:00
Silvan Mosberger
7e533bab6d
Merge pull request #267381 from tweag/fileset.fileFilter-path
...
`fileset.fileFilter`: Don't run predicate unnecessarily
2023-11-15 01:19:36 +01:00
Silvan Mosberger
e1d8331738
lib.fileset.fileFilter: Minor cleanups and more tests
2023-11-14 07:29:57 +01:00
Silvan Mosberger
9ec104bb2d
lib.fileset: Very minor changes
2023-11-13 23:57:52 +01:00
Robert Hensing
cfd83c931f
Merge pull request #261732 from tweag/fileset.fromSource
...
`lib.fileset.fromSource`: init
2023-11-10 20:32:51 +01:00
Silvan Mosberger
0ace383438
lib.fileset: Make error messages more uniform
...
Just minor changes like:
- Always using "X is a Y, but it should be Z"
- "X is a path that does not exist" rather than "X does not exist"
- Always using multi-line strings for errors
- Always quoting string-like values and not quoting path-like values
- But do quote filesystem roots. Even though they're paths, they might
be very small, good to have quotes to know the start/end
- Capitalise the first word
- Distinguish root vs filesystem root more
2023-11-08 23:59:04 +01:00
Silvan Mosberger
2d28e0cd10
lib.fileset: Remove nixdoc workaround
...
This problem was fixed in https://github.com/nix-community/nixdoc/pull/81 which is included in version 2.5.1, which is now used in Nixpkgs
2023-11-08 23:28:25 +01:00
Silvan Mosberger
e07e80e841
lib.fileset.toSource: Mention fromSource in errors
2023-11-08 21:44:44 +01:00
Silvan Mosberger
73493584a7
lib.fileset.fromSource: init
2023-11-08 21:21:30 +01:00
Silvan Mosberger
50df7f9775
lib.fileset.difference: init
2023-10-30 12:51:55 +01:00
Silvan Mosberger
f4e0043049
lib.fileset.fileFilter: init
2023-10-24 01:44:04 +02:00
Silvan Mosberger
4ecf025814
lib.fileset.intersection: init
2023-10-11 16:17:48 +02:00
Silvan Mosberger
5db719f69c
Merge pull request #256417 from tweag/fileset.trace
...
`lib.fileset.trace`, `lib.fileset.traceVal`: init
2023-10-04 17:39:20 +02:00
Silvan Mosberger
704452f29c
lib.fileset.traceVal: init
2023-10-04 16:31:11 +02:00
Silvan Mosberger
467e428f00
lib.fileset.trace: init
2023-10-04 16:30:10 +02:00
Silvan Mosberger
d5743d9268
lib.fileset.unions: Fix outdated docs
...
Since 4f35f003e6e5b800be75e3985054e5fce2dea50a unions supports empty lists too
2023-10-03 21:56:53 +02:00
Silvan Mosberger
4f35f003e6
lib.fileset: Internal representation v3, empty value without a base
...
`unions []` now works!
Notably the new empty value without a base is not exposed in the interface.
I don't know of any use case for it.
2023-10-03 17:05:57 +02:00
Silvan Mosberger
94e103ee3f
lib.fileset: Minor changes from feedback
...
Co-authored-by: Robert Hensing <robert@roberthensing.nl>
Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
2023-09-21 00:21:02 +02:00
Silvan Mosberger
c5ae093f13
lib.fileset: Various updates relating to union/unions
...
Also some minor formatting improvements
2023-09-21 00:21:01 +02:00
Silvan Mosberger
bd52895222
lib.fileset.unions: init
2023-09-21 00:20:58 +02:00
Silvan Mosberger
d866a0bda1
lib.fileset.union: init
2023-09-21 00:19:48 +02:00
Silvan Mosberger
7d4eb3f1b7
lib.fileset.toSource: Evaluate fileset even for empty directories
2023-09-13 23:32:14 +02:00
Silvan Mosberger
465e05c0c5
lib.fileset.toSource: init
2023-09-01 15:46:04 +02:00