-
Notifications
You must be signed in to change notification settings - Fork 452
Display a warning when dune builds via RPC #11833
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
Conversation
48478fc to
14c8b1b
Compare
14c8b1b to
9c96729
Compare
| Warning: A running dune (pid: 124305) instance has locked the build | ||
| directory. If this is not the case, please delete "_build/.lock". | ||
| The requested targets will still be built however functionality will be | ||
| reduced and some command line arguments will be ignored. |
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.
A couple of questions:
- "If this is not the case, please delete ..." is this relevant ? if the build is being forwarded to a running instance, it doesn't make much sense to me to ask the user to delete the lock file.
- "functionality will be reduced" what does this refer to?
I suggest tweaking the message and making it a bit less scary:
Warning: your build request is being forwarded to a running Dune instance (pid: 124305). Note that certain command line arguments may be ignored.
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.
I like the idea of warning the user when flags get ignored, but I would suggest that this would only happen if there are flags that will get discarded.
test/blackbox-tests/test-cases/watching/watching-eager-concurrent-build-command.t
Outdated
Show resolved
Hide resolved
8fa6b9f to
2c531a3
Compare
|
Updated so that it only prints the warning if extra arguments were passed to I also added |
f39d3aa to
7d09871
Compare
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 sad all these very verbose equal functions need to be added but I understand the idea.
Overall I think it needs a small wording change and an additional test and then it is good to go.
test/blackbox-tests/test-cases/watching/watching-eager-concurrent-build-command.t
Show resolved
Hide resolved
0741bbc to
25f5d93
Compare
25f5d93 to
a635197
Compare
The only [out_channel] that was ever passed in was stderr. Removing the [Out_channel] case allows us to more easily test [Log.File.t] for equality. Signed-off-by: Stephen Sherratt <[email protected]>
Signed-off-by: Stephen Sherratt <[email protected]>
Signed-off-by: Stephen Sherratt <[email protected]>
Signed-off-by: Stephen Sherratt <[email protected]>
When an instance of dune is already running, invoking `dune build` will still build the target, howwever other command line arguments are silently ignored by dune as the current RPC interface is too limited to express them. This may change over time, but currently it's unusual UX for `dune build` to behave differently depending on whether or not another instance of `dune build` is already running. To more accurately set user expectations, print a warning when dune is running with this reduced functionality. Signed-off-by: Stephen Sherratt <[email protected]>
a635197 to
83da0d3
Compare
CHANGES: ### Fixed - Stop re-running cram tests after promotion when it's not necessary (ocaml/dune#11994, @rgrinberg) - fix: `$ dune subst` should not fail when adding the version field in opam files (ocaml/dune#11801, fixes ocaml/dune#11045, @btjorge) - Kill all processes in the process group after the main process has terminated; in particular this avoids background processes in cram tests to stick around after the test finished (ocaml/dune#11841, fixes ocaml/dune#11820, @Alizter, @Leonidas-from-XIV) ### Added - `(tests)` stanzas now generate aliases with the test name. To run `(test (name a))` you can do `dune build @runtest-a`. (ocaml/dune#11558, grants part of ocaml/dune#10239, @Alizter) - Inline test libraries now produce aliases `runtest-name_of_lib` allowing users to run specific inline tests as `dune build @runtest-name_of_lib`. (ocaml/dune#11109, partially fixes ocaml/dune#10239, @Alizter) - feature: `$ dune subst` use version from `dune-project` when no version control repository has been detected (ocaml/dune#11801, @btjorge) - Allow `dune exec` to run concurrently with another instance of dune in watch mode (ocaml/dune#11840, @gridbugs) - Introduce `%{os}`, `%{os_version}`, `%{os_distribution}`, and `%{os_family}` percent forms. These have the same values as their opam counterparts. (ocaml/dune#11863, @rgrinberg) - Introduce option `(implicit_transitive_deps false-if-hidden-includes-supported)` that is equivalent to `(implicit_transitive_deps false)` when `-H` is supported by the compiler (OCaml >= 5.2) and equivalent to `(implicit_transitive_deps true)` otherwise. (ocaml/dune#11866, fixes ocaml/dune#11212, @nojb) - Add `dune describe location` for printing the path to the executable that would be run (ocaml/dune#11905, @gridbugs) - `dune runtest` can now understand absolute paths as well as run tests in specific build contexts (ocaml/dune#11936, @Alizter). - Added 'empty' alias which contains no targets. (ocaml/dune#11556 ocaml/dune#11952 ocaml/dune#11955 ocaml/dune#11956, grants ocaml/dune#4161, @Alizter and @rgrinberg) - Allow `dune promote` to properly run while a watch mode server is running (ocaml/dune#12010, @ElectreAAS) - Add `--alias` and `--alias-rec` flags as an alternative to the `@@` and `@` syntax in the command line (ocaml/dune#12043, fixes ocaml/dune#5775, @rgrinberg) - Added a `(timeout <float>)` field to the `(cram)` stanza to specify per-test time limits. Tests exceeding the timeout are terminated with an error. (ocaml/dune#12041, @Alizter) ### Changed - Format long lists in s-expressions to fill the line instead of formatting them in a vertical way (ocaml/dune#10892, fixes ocaml/dune#10860, @nojb) - Switch from MD5 to BLAKE3 for digesting targets and rules. BLAKE3 is both more performant and difficult to break than MD5 (ocaml/dune#11735, @rgrinberg, @Alizter) - Print a warning when `dune build` runs over RPC (ocaml/dune#11833, @gridbugs) - Stop emitting empty module group wrapper `.js` file in `melange.emit` (ocaml/dune#11987, fixes ocaml/dune#11986, @anmonteiro)
CHANGES: ### Fixed - Stop re-running cram tests after promotion when it's not necessary (ocaml/dune#11994, @rgrinberg) - fix: `$ dune subst` should not fail when adding the version field in opam files (ocaml/dune#11801, fixes ocaml/dune#11045, @btjorge) - Kill all processes in the process group after the main process has terminated; in particular this avoids background processes in cram tests to stick around after the test finished (ocaml/dune#11841, fixes ocaml/dune#11820, @Alizter, @Leonidas-from-XIV) ### Added - `(tests)` stanzas now generate aliases with the test name. To run `(test (name a))` you can do `dune build @runtest-a`. (ocaml/dune#11558, grants part of ocaml/dune#10239, @Alizter) - Inline test libraries now produce aliases `runtest-name_of_lib` allowing users to run specific inline tests as `dune build @runtest-name_of_lib`. (ocaml/dune#11109, partially fixes ocaml/dune#10239, @Alizter) - feature: `$ dune subst` use version from `dune-project` when no version control repository has been detected (ocaml/dune#11801, @btjorge) - Allow `dune exec` to run concurrently with another instance of dune in watch mode (ocaml/dune#11840, @gridbugs) - Introduce `%{os}`, `%{os_version}`, `%{os_distribution}`, and `%{os_family}` percent forms. These have the same values as their opam counterparts. (ocaml/dune#11863, @rgrinberg) - Introduce option `(implicit_transitive_deps false-if-hidden-includes-supported)` that is equivalent to `(implicit_transitive_deps false)` when `-H` is supported by the compiler (OCaml >= 5.2) and equivalent to `(implicit_transitive_deps true)` otherwise. (ocaml/dune#11866, fixes ocaml/dune#11212, @nojb) - Add `dune describe location` for printing the path to the executable that would be run (ocaml/dune#11905, @gridbugs) - `dune runtest` can now understand absolute paths as well as run tests in specific build contexts (ocaml/dune#11936, @Alizter). - Added 'empty' alias which contains no targets. (ocaml/dune#11556 ocaml/dune#11952 ocaml/dune#11955 ocaml/dune#11956, grants ocaml/dune#4161, @Alizter and @rgrinberg) - Allow `dune promote` to properly run while a watch mode server is running (ocaml/dune#12010, @ElectreAAS) - Add `--alias` and `--alias-rec` flags as an alternative to the `@@` and `@` syntax in the command line (ocaml/dune#12043, fixes ocaml/dune#5775, @rgrinberg) - Added a `(timeout <float>)` field to the `(cram)` stanza to specify per-test time limits. Tests exceeding the timeout are terminated with an error. (ocaml/dune#12041, @Alizter) ### Changed - Format long lists in s-expressions to fill the line instead of formatting them in a vertical way (ocaml/dune#10892, fixes ocaml/dune#10860, @nojb) - Switch from MD5 to BLAKE3 for digesting targets and rules. BLAKE3 is both more performant and difficult to break than MD5 (ocaml/dune#11735, @rgrinberg, @Alizter) - Print a warning when `dune build` runs over RPC (ocaml/dune#11833, @gridbugs) - Stop emitting empty module group wrapper `.js` file in `melange.emit` (ocaml/dune#11987, fixes ocaml/dune#11986, @anmonteiro)
CHANGES: ### Fixed - Stop re-running cram tests after promotion when it's not necessary (ocaml/dune#11994, @rgrinberg) - fix: `$ dune subst` should not fail when adding the version field in opam files (ocaml/dune#11801, fixes ocaml/dune#11045, @btjorge) - Kill all processes in the process group after the main process has terminated; in particular this avoids background processes in cram tests to stick around after the test finished (ocaml/dune#11841, fixes ocaml/dune#11820, @Alizter, @Leonidas-from-XIV) ### Added - `(tests)` stanzas now generate aliases with the test name. To run `(test (name a))` you can do `dune build @runtest-a`. (ocaml/dune#11558, grants part of ocaml/dune#10239, @Alizter) - Inline test libraries now produce aliases `runtest-name_of_lib` allowing users to run specific inline tests as `dune build @runtest-name_of_lib`. (ocaml/dune#11109, partially fixes ocaml/dune#10239, @Alizter) - feature: `$ dune subst` use version from `dune-project` when no version control repository has been detected (ocaml/dune#11801, @btjorge) - Allow `dune exec` to run concurrently with another instance of dune in watch mode (ocaml/dune#11840, @gridbugs) - Introduce `%{os}`, `%{os_version}`, `%{os_distribution}`, and `%{os_family}` percent forms. These have the same values as their opam counterparts. (ocaml/dune#11863, @rgrinberg) - Introduce option `(implicit_transitive_deps false-if-hidden-includes-supported)` that is equivalent to `(implicit_transitive_deps false)` when `-H` is supported by the compiler (OCaml >= 5.2) and equivalent to `(implicit_transitive_deps true)` otherwise. (ocaml/dune#11866, fixes ocaml/dune#11212, @nojb) - Add `dune describe location` for printing the path to the executable that would be run (ocaml/dune#11905, @gridbugs) - `dune runtest` can now understand absolute paths as well as run tests in specific build contexts (ocaml/dune#11936, @Alizter). - Added 'empty' alias which contains no targets. (ocaml/dune#11556 ocaml/dune#11952 ocaml/dune#11955 ocaml/dune#11956, grants ocaml/dune#4161, @Alizter and @rgrinberg) - Allow `dune promote` to properly run while a watch mode server is running (ocaml/dune#12010, @ElectreAAS) - Add `--alias` and `--alias-rec` flags as an alternative to the `@@` and `@` syntax in the command line (ocaml/dune#12043, fixes ocaml/dune#5775, @rgrinberg) - Added a `(timeout <float>)` field to the `(cram)` stanza to specify per-test time limits. Tests exceeding the timeout are terminated with an error. (ocaml/dune#12041, @Alizter) ### Changed - Format long lists in s-expressions to fill the line instead of formatting them in a vertical way (ocaml/dune#10892, fixes ocaml/dune#10860, @nojb) - Switch from MD5 to BLAKE3 for digesting targets and rules. BLAKE3 is both more performant and difficult to break than MD5 (ocaml/dune#11735, @rgrinberg, @Alizter) - Print a warning when `dune build` runs over RPC (ocaml/dune#11833, @gridbugs) - Stop emitting empty module group wrapper `.js` file in `melange.emit` (ocaml/dune#11987, fixes ocaml/dune#11986, @anmonteiro)
CHANGES: ### Fixed - Stop re-running cram tests after promotion when it's not necessary (ocaml/dune#11994, @rgrinberg) - fix: `$ dune subst` should not fail when adding the version field in opam files (ocaml/dune#11801, fixes ocaml/dune#11045, @btjorge) - Kill all processes in the process group after the main process has terminated; in particular this avoids background processes in cram tests to stick around after the test finished (ocaml/dune#11841, fixes ocaml/dune#11820, @Alizter, @Leonidas-from-XIV) ### Added - `(tests)` stanzas now generate aliases with the test name. To run `(test (name a))` you can do `dune build @runtest-a`. (ocaml/dune#11558, grants part of ocaml/dune#10239, @Alizter) - Inline test libraries now produce aliases `runtest-name_of_lib` allowing users to run specific inline tests as `dune build @runtest-name_of_lib`. (ocaml/dune#11109, partially fixes ocaml/dune#10239, @Alizter) - feature: `$ dune subst` use version from `dune-project` when no version control repository has been detected (ocaml/dune#11801, @btjorge) - Allow `dune exec` to run concurrently with another instance of dune in watch mode (ocaml/dune#11840, @gridbugs) - Introduce `%{os}`, `%{os_version}`, `%{os_distribution}`, and `%{os_family}` percent forms. These have the same values as their opam counterparts. (ocaml/dune#11863, @rgrinberg) - Introduce option `(implicit_transitive_deps false-if-hidden-includes-supported)` that is equivalent to `(implicit_transitive_deps false)` when `-H` is supported by the compiler (OCaml >= 5.2) and equivalent to `(implicit_transitive_deps true)` otherwise. (ocaml/dune#11866, fixes ocaml/dune#11212, @nojb) - Add `dune describe location` for printing the path to the executable that would be run (ocaml/dune#11905, @gridbugs) - `dune runtest` can now understand absolute paths as well as run tests in specific build contexts (ocaml/dune#11936, @Alizter). - Added 'empty' alias which contains no targets. (ocaml/dune#11556 ocaml/dune#11952 ocaml/dune#11955 ocaml/dune#11956, grants ocaml/dune#4161, @Alizter and @rgrinberg) - Allow `dune promote` to properly run while a watch mode server is running (ocaml/dune#12010, @ElectreAAS) - Add `--alias` and `--alias-rec` flags as an alternative to the `@@` and `@` syntax in the command line (ocaml/dune#12043, fixes ocaml/dune#5775, @rgrinberg) - Added a `(timeout <float>)` field to the `(cram)` stanza to specify per-test time limits. Tests exceeding the timeout are terminated with an error. (ocaml/dune#12041, @Alizter) ### Changed - Format long lists in s-expressions to fill the line instead of formatting them in a vertical way (ocaml/dune#10892, fixes ocaml/dune#10860, @nojb) - Switch from MD5 to BLAKE3 for digesting targets and rules. BLAKE3 is both more performant and difficult to break than MD5 (ocaml/dune#11735, @rgrinberg, @Alizter) - Print a warning when `dune build` runs over RPC (ocaml/dune#11833, @gridbugs) - Stop emitting empty module group wrapper `.js` file in `melange.emit` (ocaml/dune#11987, fixes ocaml/dune#11986, @anmonteiro)
CHANGES: ### Fixed - Stop re-running cram tests after promotion when it's not necessary (ocaml/dune#11994, @rgrinberg) - fix: `$ dune subst` should not fail when adding the version field in opam files (ocaml/dune#11801, fixes ocaml/dune#11045, @btjorge) - Kill all processes in the process group after the main process has terminated; in particular this avoids background processes in cram tests to stick around after the test finished (ocaml/dune#11841, fixes ocaml/dune#11820, @Alizter, @Leonidas-from-XIV) ### Added - `(tests)` stanzas now generate aliases with the test name. To run `(test (name a))` you can do `dune build @runtest-a`. (ocaml/dune#11558, grants part of ocaml/dune#10239, @Alizter) - Inline test libraries now produce aliases `runtest-name_of_lib` allowing users to run specific inline tests as `dune build @runtest-name_of_lib`. (ocaml/dune#11109, partially fixes ocaml/dune#10239, @Alizter) - feature: `$ dune subst` use version from `dune-project` when no version control repository has been detected (ocaml/dune#11801, @btjorge) - Allow `dune exec` to run concurrently with another instance of dune in watch mode (ocaml/dune#11840, @gridbugs) - Introduce `%{os}`, `%{os_version}`, `%{os_distribution}`, and `%{os_family}` percent forms. These have the same values as their opam counterparts. (ocaml/dune#11863, @rgrinberg) - Introduce option `(implicit_transitive_deps false-if-hidden-includes-supported)` that is equivalent to `(implicit_transitive_deps false)` when `-H` is supported by the compiler (OCaml >= 5.2) and equivalent to `(implicit_transitive_deps true)` otherwise. (ocaml/dune#11866, fixes ocaml/dune#11212, @nojb) - Add `dune describe location` for printing the path to the executable that would be run (ocaml/dune#11905, @gridbugs) - `dune runtest` can now understand absolute paths as well as run tests in specific build contexts (ocaml/dune#11936, @Alizter). - Added 'empty' alias which contains no targets. (ocaml/dune#11556 ocaml/dune#11952 ocaml/dune#11955 ocaml/dune#11956, grants ocaml/dune#4161, @Alizter and @rgrinberg) - Allow `dune promote` to properly run while a watch mode server is running (ocaml/dune#12010, @ElectreAAS) - Add `--alias` and `--alias-rec` flags as an alternative to the `@@` and `@` syntax in the command line (ocaml/dune#12043, fixes ocaml/dune#5775, @rgrinberg) - Added a `(timeout <float>)` field to the `(cram)` stanza to specify per-test time limits. Tests exceeding the timeout are terminated with an error. (ocaml/dune#12041, @Alizter) ### Changed - Format long lists in s-expressions to fill the line instead of formatting them in a vertical way (ocaml/dune#10892, fixes ocaml/dune#10860, @nojb) - Switch from MD5 to BLAKE3 for digesting targets and rules. BLAKE3 is both more performant and difficult to break than MD5 (ocaml/dune#11735, @rgrinberg, @Alizter) - Print a warning when `dune build` runs over RPC (ocaml/dune#11833, @gridbugs) - Stop emitting empty module group wrapper `.js` file in `melange.emit` (ocaml/dune#11987, fixes ocaml/dune#11986, @anmonteiro)
When an instance of dune is already running, invoking
dune buildwill still build the target, howwever other command line arguments are silently ignored by dune as the current RPC interface is too limited to express them. This may change over time, but currently it's unusual UX fordune buildto behave differently depending on whether or not another instance ofdune buildis already running. To more accurately set user expectations, print a warning when dune is running with this reduced functionality.