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/index.html"'s ETag never invalidates #894

Closed
matanlurey opened this issue Jan 23, 2018 · 4 comments
Closed

"web/index.html"'s ETag never invalidates #894

matanlurey opened this issue Jan 23, 2018 · 4 comments
Labels
package:build_runner type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)

Comments

@matanlurey
Copy link
Contributor

Simple reproduction case:

Files:

web/
  index.html

Pubspec:

name: angular_hello_world

environment:
  sdk: '>=2.0.0-dev <2.0.0'

dependencies:
  angular: ^5.0.0-alpha+4

dev_dependencies:
  build_runner: ^0.7.8
  build_web_compilers: ^0.2.1

dependency_overrides:
  analyzer: ^0.31.0-alpha.1

Terminal:

pub run build_runner serve

As viewed by @natebosch as well, a hard-refresh of the browser is required to see changes.

We suspect the ETag is not being invalidated. We might want to add testing around ETag in general.

@matanlurey matanlurey added type-bug Incorrect behavior (everything from a crash to more subtle misbehavior) package:build_runner labels Jan 23, 2018
@natebosch
Copy link
Member

Strangely I can't repro this with e2e_example...

@matanlurey
Copy link
Contributor Author

Here is my lock file: https://gist.github.com/matanlurey/d57d173097cb9ade269795fa44d22a14

Here is my pubspec.yaml:

name: angular_hello_world

environment:
  sdk: '>=2.0.0-dev <2.0.0'

dependencies:
  angular: ^5.0.0-alpha+4

dev_dependencies:
  build_runner: ^0.7.8
  build_web_compilers: ^0.2.1

dependency_overrides:
  analyzer: ^0.31.0-alpha.1

Dart VM version: 2.0.0-dev.19.0 (Fri Jan 19 08:01:12 2018 +0100) on "macos_x64"

I do see this:

[FINEST] Watch: Got modify event for "asset:angular_hello_world/web/index.html in /Users/matanl/git/build_playground/angular_hello_world/./
[INFO] Watch: Starting Build
[INFO] Build: Updating asset graph completed, took 0ms
[INFO] Build: Running build completed, took 66ms
[INFO] Build: Caching finalized dependency graph completed, took 60ms
[INFO] Build: Succeeded after 128ms with 0 outputs

... but I get a 304 Not Modified in Chrome.

@natebosch
Copy link
Member

Can repro outside of e2e_example

one interesting difference, your rebuild has 0 outputs and mine has 1, so something is reading index.html to produce an output in my example - that's almost certainly the difference.

Which I think means that we're missing some invalidation on the digest stored on the AssetGraph nodes.

@kevmoo
Copy link
Member

kevmoo commented Jan 24, 2018

Also reproduced this w/ angular_components_example editing web/index.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package:build_runner type-bug Incorrect behavior (everything from a crash to more subtle misbehavior)
Projects
None yet
Development

No branches or pull requests

3 participants