Open DruMasterMunch opened 6 years ago
Tested with version 2.0.0 => same bug Tested with version 1.4.0 => works fine
Thank you so much for the thorough report! With alpha work changing quite a bit of internals it's been easy to break even the simple things at times. I've seen both of these issues before but the isolated test case is a godsend.
Stay tuned
To test with or without incrementalBuild, i'm forcing it in the file node_modules@pattern-lab\patternlab-node\core\index.js adding this line 192 : patternlab.incrementalBuildsEnabled = false;
FWIW - incremental build is controlled by http://patternlab.io/docs/advanced-config-options.html#cleanpublic though in this case it looks like it may be running either way
I just did the same test suite against dev
—works like a charm with incremental build turned on ("cleanPublic" : true,
). It however breaks with the first error when "cleanPublic" : false,
is set.
I investigated this further. It seems to be a bug with the PatternRegistry. On the initial run I get the following dump from it (pattern_graph.js:131:15
):
--------
name: 10-atoms/btn~core.json
fileName: btn~core
--------
name: 10-atoms/btn.mustache
fileName: btn
--------
=> Make change to any file
--------
name: 10-atoms/btn~core.json
fileName: btn~core
--------
name: 10-atoms/btn.mustache
fileName: undefined
--------
It cannot retrieve the pattern from the Map.
Maybe @tburny can take a look as well.
I am using Pattern Lab Node- Gulp Edition
v3.0.0-alpha.7
onWindows
.Expected Behavior
gulp patternlab:serve should build pseudoPatterns, and then be able to watch for changes and rebuild
Actual Behavior
gulp patternlab:serve succeed in building pseudoPatterns in the first place (everything is fine in patternlab), but fail on watching changes:
when incremental build is enabled, this error occured:
Now with incremental build disabled, this error:
Steps to Reproduce
On fresh install, creating a pattern _patterns/atoms/btn.mustache :
and create 2 json files: _patterns/atoms/btn.json => {"text": "Test"} _patterns/atoms/btn~core.json => {"text": "Core"}
launch gulp patternlab:serve Everything should work fine, and the 2 differents buttons are displayed in patternlab Now trigger any change in one of those file And one of the error described above should appear, depending on whether or not IncrementalBuild is active
To test with or without incrementalBuild, i'm forcing it in the file node_modules\@pattern-lab\patternlab-node\core\index.js adding this line 192 : patternlab.incrementalBuildsEnabled = false;
Thanks for your feedbacks