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

ColorSwatch randomly doesn't load #343

Open
pgregorova opened this issue Feb 12, 2018 · 3 comments
Open

ColorSwatch randomly doesn't load #343

pgregorova opened this issue Feb 12, 2018 · 3 comments

Comments

@pgregorova
Copy link
Member

Both @bstaruk and I, we have noticed that from time-to-time the color swatch generator doesn't work as expected since we merged in #333.

Current Behavior

On random occasions, <SgColorSwatch /> doesn't load when changes are made to either CSS or JSX files. The behavior is inconsistent. At times SgColorSwatch__Colors.json gets emptied when it makes sense that nothing generates but even if it doesn't empty itself and even updates its content, the color swatches either don't get updated or don't appear on Colors page at all.

Steps to Reproduce (for bugs)

On random occasions, there are few ways I was able to reproduce the issue while working in the latest develop branch.

  1. Make a change to colors.css or any CSS file
  2. Make change to JSX file
  3. I'd revert changes in json file after stopping npm run dev and then run the command again. Sometimes nothing would render on the page even though json file would regenerate with the changes or it would render the outdated changes.
@CSKingMartin
Copy link
Contributor

@drolsen did you recently implement changes to the Colors compile?

@drolsen
Copy link
Member

drolsen commented Feb 12, 2018

#333
@CSKingMartin yes, and I know what the issue is.

Need to lower the timestamp down is all. I'll PR this fix this afternoon.
Thanks!

@blipson89
Copy link

blipson89 commented Mar 13, 2018

@drolsen @CSKingMartin bumping this.

It appears there may be a race condition here. Since that json file kept getting regenerated on build, git kept asking me to commit it. I removed the file and added it to the .gitignore.

Next time I ran a build, the build failed because the file wasn't present. I looked in the directory and the file was there. My take is that FC tried to access the file before it was created. Looks like there may be a race condition here.

This is causing builds to fail at the moment.

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

5 participants