Changes to build.rs do not restart the development server or queue worker
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 83/100
Research direction
Start by reading the dev:server and dev:queue script definitions and compare their watch lists with the root Cargo.toml entry. The issue reports that both omit build.rs and that adding it makes each process restart once. Update the scripts to watch the root build script, then verify edits to build.rs restart both processes.
Written by the indexing model from the issue text.
Description
When an application uses its root build.rs to set a compile-time value, changing that value leaves the running development server on the previous build until another watched file changes.
Reproduced on Linux using the dev:server script from 0.x (46f28287), the locked Nodemon 3.1.11, and a small Rust HTTP app built by Cargo:
- In
build.rs, emitprintln!("cargo::rustc-env=DEMO_LABEL=first");and returnenv!("DEMO_LABEL")from a route. Startnpm run dev:serverand request the route. It returnsfirst. - Change
firsttosecondinbuild.rsand save. After two seconds, the route still returnsfirst. - Touch
src/main.rswithout changing the handler. The server rebuilds and the same route now returnssecond.
The starter's dev:server and dev:queue scripts both omit build.rs from their explicit watch lists. In a separate restart-count test, editing build.rs triggered neither process. Adding --watch build.rs to both scripts made each restart once. Could the development scripts watch the root build script alongside Cargo.toml?
- Dominant language
- Rust
- Stars
- 2.2k
- Forks
- 105
- Avg merge
- 7h 19m
- Merged PRs (30d)
- 41
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from laravel/rust
-
Difficulty 1/5 Under an hour Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
laravel/rust#98 · 8 comments · 10 reactions ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
Maintainers usually reply within 1 day
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
neuralmagic/crucible#579 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
laravel/rust-framework#864 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
eclipse-score/kyron#249 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 67/100
seanmonstar/reqwest#3157 ·
Maintainers usually reply within 2 days