Comments (19)
sure, I'll fix it and bump a new version today, thank you!
from phoenix_live_reload.
file_system 0.2.0; phoenix_live_reload 1.1.0
Works just fine.
phoenix_live_reload version wasn't bumped.
Another day saved! A beautiful day indeed. :)
from phoenix_live_reload.
Please include your version of phoenix_live_reload
from mix deps
from phoenix_live_reload.
Also, is anything logged when you run mix phx.server
?
from phoenix_live_reload.
On changing files it is not logging anything to 'iex' on phoenix 1.3 but on phoenix 1.2 it shows log.
For phoenix 1.3, phoenix_live_reload version installed is 1.1.0.
For phoenix 1.2.4. phoenix_live_reload version installed is 1.0.8.
It was tested creating a new phoenix project from scratch using 'mix phx.new xxx'.
Any further step?
from phoenix_live_reload.
@superherointj just to be double sure, can you please start a new phoenix session with iex -S mix phx.server
, do a new request and then post here everything that is printed to the terminal from the call to IEx up to the end? Thanks!
from phoenix_live_reload.
As a data point, a Phoenix 1.3 project on Windows 10 in MIX_ENV=dev
reloads files fine here, css, source, and templates.
from phoenix_live_reload.
D:\dev\elixir\liver>iex -S mix phx.server
[info] Running LiverWeb.Endpoint with Cowboy using http://0.0.0.0:4000
Interactive Elixir (1.5.1) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> 14:48:30 - info: compiled 5 files into 2 files, copied 3 in 1.1 sec
HERE I OPEN THE PAGE
iex(1)> [info] GET /
iex(1)> [debug] Processing with LiverWeb.PageController.index/2
Parameters: %{}
Pipelines: [:browser]
iex(1)> [info] Sent 200 in 94ms
HERE I CHANGE ONE FILE FOR EXAMPLE APP.JS added a console.log('changed') to it
iex(1)> 14:49:39 - info: compiled app.js and 3 cached files into app.js in 115 ms
iex(1)>
There is no additional logs!!
See picture:
from phoenix_live_reload.
Thanks @OvermindDL1! Can you please check it after mix deps.update phoenix_live_reload
as well? We have recently released a new version, so you may not be running on the latest.
from phoenix_live_reload.
@superherointj thanks! We can see that the assets are being recompiled. So it is indeed something specific to the live reload in particular.
from phoenix_live_reload.
D:\dev\elixir\liver>mix deps.update phoenix_live_reload
Running dependency resolution...
Dependency resolution completed:
cowboy 1.1.2
cowlib 1.0.2
file_system 0.1.5
gettext 0.13.1
mime 1.1.0
phoenix 1.3.0
phoenix_html 2.10.4
phoenix_live_reload 1.1.0
phoenix_pubsub 1.0.2
plug 1.4.3
poison 3.1.0
ranch 1.3.2
from phoenix_live_reload.
Sorry, the mix deps.update
command was for @OvermindDL1. :) You are on latest.
@superherointj, can you please try this:
$ iex -S mix phx.server
iex> FileSystem.start_link(dirs: [Path.absname("")], name: :trying_out)
And let us know what it returns?
from phoenix_live_reload.
What should I fill Path.absname("") with? Try it empty?
--
D:\dev\elixir\liver>iex -S mix phx.server
[info] Running LiverWeb.Endpoint with Cowboy using http://0.0.0.0:4000
Interactive Elixir (1.5.1) - press Ctrl+C to exit (type h() ENTER for help)
iex(1)> 15:07:12 - info: compiled 5 files into 2 files, copied 3 in 1.2 sec
iex(1)> FileSystem.start_link(dirs: [Path.absname("")], name: :trying_out)
{:ok, #PID<0.326.0>}
HERE I LOAD PAGE
iex(2)> [info] GET /
iex(2)> [debug] Processing with LiverWeb.PageController.index/2
Parameters: %{}
Pipelines: [:browser]
iex(2)> [info] Sent 200 in 32ms
HERE I MAKE CHANGE TO app.js
iex(2)> 15:08:48 - info: compiled app.js and 3 cached files into app.js in 93 ms
No logs about change event on iex. No automatic update on browser.
I could give you access to this computer on TeamViewer. If it can speed things up for you.
from phoenix_live_reload.
@superherointj helped me find the bug. The issue is that the paths reported by file_system
on Windows are using \\
but the patterns only use /
.
@falood @mveytsman what do you think should be the proper solution here?
Should the filesystem project normalize paths? Or should it return the raw paths and Phoenix does the normalization? In any case, the solution is easy:
path = path |> Path.split |> Path.join
It is just a matter of deciding the best place to put it.
from phoenix_live_reload.
It seems erlang use /
as default path separate in windows, so I think I should return the same format with my code, right?
BTW, Path.join
also use /
for windows.
from phoenix_live_reload.
@falood yes, that's why using path |> Path.split |> Path.join
works, because Elixir and Erlang normalizes it. If we want to fix it in file_ssytem
, it should be a question of doing the split+join here: https://github.com/falood/file_system/blob/master/lib/file_system/backends/fs_windows.ex#L152
But if you don't think we should change file_system, then I can fix it here. :) your call!
from phoenix_live_reload.
@josevalim I have fixed and released the new version, it's not a fast-forward change, so the new version number is v0.2.0
.
from phoenix_live_reload.
Beautiful, thank you! @superherointj can you please run:
mix deps.clean phoenix_live_reload
mix deps.clean file_system
mix deps.update file_system
and let us know if it works? Thank you.
from phoenix_live_reload.
β€οΈ π π π π
from phoenix_live_reload.
Related Issues (20)
- Problems with page reload strategy in LiveView pages embedded via cross-domain iframes HOT 3
- Add debounce for live reloading HOT 5
- Live Reload isn't joining the channel HOT 3
- add new prefix option
- 1.6 support? HOT 2
- Live reload injected in wrong `body` HOT 1
- Changes to Functional Components not reloading correctly HOT 2
- Add option to do full page reloads when CSSΒ changes HOT 3
- Unable to specify custom prefix for `live_reload/frame` url HOT 4
- Watch for changes outside the project folder HOT 1
- Browser freezing for two minutes on LiveReload HOT 3
- Release v1.3.4
- Debounce live reload events HOT 6
- Live reload breaks debugging session in elixirLS debugger HOT 4
- Live reload not triggering HOT 2
- Reciprocating a `Cross-Origin-Embedder-Policy` (COEP) of `require-corp`
- Warning during compilation on Elixir 1.15.x HOT 3
- Warn if no <body> present HOT 8
- LiveReload requires unsafe-inline script_src for CORS HOT 4
- Update FileSystem to 1.0.0 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phoenix_live_reload.