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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WEB: support watch all of web_ui folder instead of only web_ui/lib #165301

Open
zhangyuang opened this issue Mar 17, 2025 · 3 comments
Open

WEB: support watch all of web_ui folder instead of only web_ui/lib #165301

zhangyuang opened this issue Mar 17, 2025 · 3 comments
Labels
c: new feature Nothing broken; request for a new capability c: proposal A detailed proposal for a change to Flutter engine flutter/engine repository. See also e: labels. P2 Important issues not at the top of the work list platform-web Web applications specifically team-web Owned by Web platform team triaged-web Triaged by Web platform team

Comments

@zhangyuang
Copy link

zhangyuang commented Mar 17, 2025

Use case

When run felt build --watch in this project I find some problems with this code https://github.com/flutter/flutter/blob/master/engine/src/flutter/lib/web_ui/dev/build.dart#L96, flutter only supports watch web_ui/lib folder change when developing locally. I hope there can support watching all of the web_ui folders like the flutter_js folder because I want to re-execute the js bundle build by esbuild when files in flutter_js changed

Proposal

Change final FilePath libPath = FilePath.fromWebUi('lib'); to final FilePath libPath = FilePath.fromWebUi('.');

If it can be approved, I can submit a pull request

@darshankawar darshankawar added in triage Presently being triaged by the triage team c: new feature Nothing broken; request for a new capability platform-web Web applications specifically c: proposal A detailed proposal for a change to Flutter team-web Owned by Web platform team engine flutter/engine repository. See also e: labels. and removed in triage Presently being triaged by the triage team labels Mar 18, 2025
@yjbanov
Copy link
Contributor

yjbanov commented Mar 18, 2025

We probably don't want to watch all of web_ui to avoid recursion (felt itself lives inside web_ui), and churn (build artifacts are unstable). However, I think we can add a few more frequently edited directories (flutter_js, skwasm, maybe even test?).

@yjbanov yjbanov added P2 Important issues not at the top of the work list triaged-web Triaged by Web platform team labels Mar 18, 2025
@zhangyuang
Copy link
Author

Sure, if you agree with it, i can try to implement watch more directories in local. Currently i debug with web_ui for support more platform like miniprogram.

@zhangyuang
Copy link
Author

zhangyuang commented Mar 18, 2025

In my opinion, I want to implement these

  • Support watch more directories, when files changed, the jobs of ninja will rebuild
  • Avoid task conflict, when last build job not finished but next job trigger like esbuild + zip will cause the new job cannot be execute succeed
  • Don't need to build the zip file of web artifact everytime in watch mode which will spend much time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c: new feature Nothing broken; request for a new capability c: proposal A detailed proposal for a change to Flutter engine flutter/engine repository. See also e: labels. P2 Important issues not at the top of the work list platform-web Web applications specifically team-web Owned by Web platform team triaged-web Triaged by Web platform team
Projects
None yet
Development

No branches or pull requests

3 participants