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

Incremental Builds: Updating global data.json does not appear to rebuild all patterns #638

Closed
bmuenzenmeyer opened this issue Mar 10, 2017 · 8 comments

Comments

@bmuenzenmeyer
Copy link
Member

bmuenzenmeyer commented Mar 10, 2017

I am using Pattern Lab Node v2.8.0 on Windows, with Node v4.6.2, using the Gulp Edition.

Expected Behavior
  • Updating _data/data.json causes any patterns using data within to hae changes reflected
Actual Behavior
  • No changes are observed when data changes, despite PL performing a build. It appears as if the dependencyGraph is still reporting patterns as clean under this scenario.
Steps to Reproduce
  • Have a pattern that takes a basic piece of data from the global object defined in _data/data.json
<p>
  {{blurb}}
</p>

  • Build with following data in _data/data.json:
{
  "blurb": "Foobar"
}

See Foobar added within paragraph.

  • Trigger another build.
{
  "blurb": "Foobarbaz"
}
Workaround

Save the file with an arbitrary change, causing it to be dirty and pick up the new data.

@tburny
Copy link

tburny commented Mar 10, 2017

Changing a data.json file does not rebuild the whole patternlab. Temporarily use cleanPublic=true as a workaround.

https://github.com/pattern-lab/patternlab-node/wiki/Incremental-Builds

@bmuenzenmeyer
Copy link
Member Author

Oh, I missed that point - thanks for clarifying. For my purposes, saving the file arbitrarily works great too.

@bjornwang
Copy link

I have the same error for _meta/00-head.mustache. Changing that file does not rebuild patterns correctly. Actually, if I delete the whole public/ folder and rebuild it, it is still rendered with the old _meta/00-head.mustache file content, so that seems to be cached somewhere.

Developing on two laptops working on the same project repo, I can reproduce this on both Windows and Mac.

Only fix is setting cleanPublic=true.

@stale
Copy link

stale bot commented Oct 2, 2017

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the needs response label Oct 2, 2017
@StephanieHolzer
Copy link

Any update on this? We run in a similar issue. When changing somethings in a JSON file, the pattern will not be rebuild. But changing something in a JSON file of a variant (e.g. example~variant1.json) the pattern will be rebuild.

@stale stale bot removed the needs response label Oct 6, 2017
@bmuenzenmeyer
Copy link
Member Author

@SteffiB this hasn't made it into my immediate roadmap, but I appreciate you letting me know it's a problem. I'll fit it into the priorities somewhere. PRs always welcome too!

@bmuenzenmeyer bmuenzenmeyer added the pinned 📌 Don't let stalebot clean this up label Oct 6, 2017
@tburny tburny self-assigned this Oct 7, 2017
@tburny
Copy link

tburny commented Oct 7, 2017

Also linked to #695. The problem is the same: There is no pattern for these files, so their changes are not picked up.
When detecting a change in _meta or data.json, all patterns need to be rebuilt.

@bmuenzenmeyer
Copy link
Member Author

bmuenzenmeyer commented Oct 7, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants