soundstruck
Phoenix: Funky reload behavior with Atom
For some strange reason, when I switch tabs in Atom, or open a file in Atom, it’s causing Phoenix to re-compile assets and reload the page, even when there are no changes to those files.
For example:
click a .vue file tab in Atom:
17:19:37 - info: compiled myfile.vue and 320 cached files into app.js in 636 ms, and the page reloads.
click a .styl file tab in Atom:
17:20:27 - info: compiled myfile.styl and 4 cached files into app.css in 284 ms, and the page reloads.
This is happening without making any edits to those files. It’s not happening with .js files for some reason.
All I have to do is open the file in Atom, OR, click on one of the opened file’s tabs in Atom.
Can anyone who is using Atom confirm?
Me: MacOS, Atom version: 1.23.3
I’ve been using Atom and this was not happening before, so I’m not sure if an Atom update caused it, or if it’s anything that I’ve done. It’s certainly annoying!
Thanks in advance for any insight or suggestions.
p.s. This behavior is not happening in VS Code, so it does seem to be Atom related. I’m just not sure what the relationship between Atom/Phoenix could be to cause it, and I’m not sure where else to troubleshoot it.
Most Liked
josevalim
My suggestion would be to disable all plugins and see if the behaviour persists. If it doesn’t, add them back until you see the problem again.
Do you have any plugin that shows which lines are being added/removed from version control directly in the editor? That would be a good starting point.
OvermindDL1
That’s, uh, weird… o.O
Did you find it out using package-cop? ![]()
Well git doesn’t write to the file system except on very few calls… Maybe watch what PID’s are opening up on the files? Can always test with another filewatcher and see the specific events that are coming through too?
Hmm, I wonder if the reload is happening on ‘read’ requests too, not just write, that would be odd… Unless… does the Mac OS update the (access) timestamp of a file when it is read?
EDIT: Oh, I bet the status bar is showing git information yes?
OvermindDL1
Lol, well this forum has instant updates if the page remains loaded. ^.^
Popular in Questions
Other popular topics
Categories:
Sub Categories:
Forums
Popular Tags
- #ecto
- #liveview
- #troubleshooting
- #learning-elixir
- #deployment
- #library
- #erlang
- #testing
- #genserver
- #mix
- #absinthe
- #remote-other
- #otp
- #plug
- #how-to-question
- #macros
- #postgres
- #channels
- #elixirconf
- #exunit
- #discussion
- #code-sync
- #javascript
- #podcasts
- #onsite
- #dialyzer
- #docker
- #authentication
- #umbrella
- #full-time-contract
- #podcasts-by-brainlid
- #ecto-query
- #elixir-ls
- #phoenix_html
- #iex
- #blog-post
- #graphql
- #genstage
- #ai
- #websockets
- #supervisor
- #advent-of-code
- #elixirconf-us
- #distillery
- #processes
- #forms
- #api
- #metaprogramming
- #security
- #performance








