-
Notifications
You must be signed in to change notification settings - Fork 414
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add only_sources
field to copy_files
stanza
#9827
Changes from 6 commits
a4c3678
a266d14
4b0a038
25b58fe
8434970
12cd755
26ae93e
f81d57f
df71976
6166c80
dd2bd16
4bd6b3e
ef07616
5802eae
d1ee4b7
1834f9b
87a5ffc
fc022d2
236ea2c
6914cea
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
Show that copy_files operates on the build folder, copying over e.g. .re.ml files | ||
|
||
$ mkdir -p subdir | ||
$ cat >dune-project <<EOF | ||
> (lang dune 3.14) | ||
> EOF | ||
$ cat >subdir/dune <<EOF | ||
> (library (name foo)) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you change the test not to rely on libraries? It should be easy enough to just use the files being copied as targets. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Sorry, i don't understand what you mean. The rule that has If I target the copied file Could you share a snippet of what you have in mind please? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Something like this:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I tried this but get an error due to multiple rules generated:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think you can just modify the glob to exclude There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, I updated the test in f81d57f. |
||
> EOF | ||
$ cat >subdir/foo.re <<EOF | ||
> let t = 1 | ||
> EOF | ||
$ cat >dune <<EOF | ||
> (copy_files (files subdir/*.ml)) | ||
> EOF | ||
$ dune build | ||
$ ls _build/default | grep foo.re.ml | ||
foo.re.ml | ||
|
||
Show the difference when `only_sources` is used | ||
|
||
$ cat >dune <<EOF | ||
> (copy_files (only_sources true) (files subdir/*.ml)) | ||
> EOF | ||
$ dune build | ||
$ ls _build/default | grep foo.re.ml | ||
[1] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note I had to change this to be able to run the test. Not sure if bumping this version involves more work / should be done in a different PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's a bit surprising that this version is stored in
dune-rpc
library 🤔