Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] watch mode for code conventions #605

Open
3cp opened this issue Sep 2, 2019 · 2 comments
Open

[BUG] watch mode for code conventions #605

3cp opened this issue Sep 2, 2019 · 2 comments
Assignees
Labels
Projects
Milestone

Comments

@3cp
Copy link
Member

3cp commented Sep 2, 2019

馃悰 Bug Report

Aurelia 2 moved conventions from runtime to compile time. It simplified many things, but introduced a hard-to-resolve issue in development watch mode.

馃 Expected Behavior

For conventional view, foo.js (or foo.ts) compiled result depends on existence of foo.html.
For conventional style, foo.html compiled result depends on existence of foo.css (or sass/scss/less/styl file).

In dev watch mode, we expect re-compilation on what ever needed.

馃槸 Current Behavior

But in reality, when user creates foo.js, then creates foo.html, the second creation would not trigger a re-compiling on foo.js. User has to touch foo.js again in order to re-compile it.

The story is same for foo.html and foo.css pair.

In comparison, Aurelia v1 doesn't have this issue, because the js/html pair is handled at runtime, not compile time. (FYI, Aurelia v1 doesn't support the convention of html/css pair)

馃拋 Possible Solution

Not sure what can be done. Probably need to customise all bundlers' watch mode.
Suggestions are welcome.

馃敠 Context

馃捇 Code Sample

馃實 Your Environment

Update: side note, #842, we might have jest cache issue similar to this one.

@EisenbergEffect
Copy link
Contributor

Could we set up a secondary watcher that "touches" related files?

@3cp
Copy link
Member Author

3cp commented Sep 2, 2019

For gulp watcher, I can listen to "add" and "unlink" events and touch related files. (Update: it works.)
https://github.com/gulpjs/glob-watcher

But there is no such customization I can find in webpack watch documentation. Might need another watcher as you suggested.

3cp added a commit to aurelia/new that referenced this issue Sep 4, 2019
Partly address aurelia/aurelia#605 for now. We might need to bring `{since: gulp.lastRun()}` back in future for performance. Note: `since` cannot be used for many-to-one compilation like less/sass files.
@fkleuver fkleuver added this to Triage in Work queue Oct 7, 2019
@fkleuver fkleuver moved this from Triage to Backlog in Work queue Oct 7, 2019
@fkleuver fkleuver added this to the Au2 v1.0-alpha milestone Oct 7, 2019
@fkleuver fkleuver modified the milestones: v2.0-alpha, v2.0-beta Jul 17, 2020
@Sayan751 Sayan751 modified the milestones: v2.0-beta, v2.x Feb 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Work queue
  
Backlog
Development

No branches or pull requests

4 participants