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

Referencing files that don't exist interrupts CI mode. #49

Open
jglovier opened this issue Jan 17, 2013 · 5 comments
Open

Referencing files that don't exist interrupts CI mode. #49

jglovier opened this issue Jan 17, 2013 · 5 comments

Comments

@jglovier
Copy link
Member

So I'm using the new anvil.templates plugin that Creamer has been developing for building static files from source. I'm running in --ci mode so I can see changes update in the browser live, and it's working great.

I've got handlebars templating setup for partials, and I noticed an issue with CI mode. Turns out if you reference files in the code that don't exist yet (like a new handlebars template, or an image asset) it breaks CI mode. And by "breaks" what I mean is that CI mode stops updating the markup in the browser on save. It does keep running, and trying to update files (as proven by watching the terminal while I save a file in src), but it just doesn't actually compile the new code.

The really strange thing is that this "broken" behavior continues even after you create the missing file or asset that is being referenced in the code. My only solution then is to go back to the directory and run anvil to completely recompile, ctrl+c out of CI mode, and then run anvil --ci --host all over again.

However, if while running in CI mode I create a new asset, then reference it from the code and save, it doesn't seem to break CI mode if performed in that order. So it's just when you are referencing a file or asset that does not exist yet.

@arobson
Copy link
Contributor

arobson commented Feb 1, 2013

Hey @jglovier,

Are you continuing to see this behavior since the 0.9.0/0.9.1? You'll need to update your plug-ins as well if you haven't. Just curious to know if it's still broken. Thanks

@jglovier
Copy link
Member Author

jglovier commented Feb 1, 2013

@arobson I haven't upgraded yet, I'm still on 0.9.0-RC4. I was hesitant to upgrade since Creamer's environment broke, and I couldn't afford to be dead in the water on this project right now at all.

But should I be able to upgrade without breaking anything now? Was his issue unique to his Windows setup?

@arobson
Copy link
Contributor

arobson commented Feb 1, 2013

@creamer's environment did get hosed, but there was an odd bug hanging out in the source that somehow never got caught before and we've since resolved a few other issues.

No rush, but when you're ready, I would suggest doing the following things:

  1. install a different node version than the current one you're using (nvm install v0.8.17 for example)
  2. backup your extension folder: mv ~/.anvilextensions ~/.anvilextbak
  3. clean the cache: npm cache clear
  4. change to your new node environment and install: npm install anvil.js -g

If you're having issues after that you can easily role back everything:

  1. change BACK to your previous node environment
  2. remove the recent plugins: rm -rf ~/.anvilextensions
  3. move back your backup: ~/.anvilextbak ~/.anvilextensions

That will put everything back in place. If you happen to test this out and run into issues, I'd appreciate it if you'd log them and the stack traces as GitHub issues so I can stay on top of this stuff over time. Creamer isn't the only person that didn't have a smooth upgrade, but I'm having a hard time figuring out what the issues are.

@jglovier
Copy link
Member Author

jglovier commented Feb 1, 2013

Cool. I have a break in the action on Monday after my deliverables, so I'll go through those steps on Tues and report back.

@jglovier
Copy link
Member Author

jglovier commented Feb 5, 2013

Dang it. I missed that window to hit "Y" on Check for updates for all installed plugins? What command do I run to update plugins?

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

No branches or pull requests

2 participants