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

adding new html includes without removing old ones #47

Closed
thosmos opened this issue Nov 27, 2015 · 5 comments
Closed

adding new html includes without removing old ones #47

thosmos opened this issue Nov 27, 2015 · 5 comments

Comments

@thosmos
Copy link

thosmos commented Nov 27, 2015

When I update a source file, new includes are being added to the html without removing old ones, which I think is causing the new code to fail to run correctly:

    <link href="/css/main.css" rel="stylesheet" type="text/css">
  <script type="text/javascript" charset="UTF-8" src="/js/app.out/ui/views/campaign_detail.js?zx=2mv0nsa82fsc"></script>
  <script type="text/javascript" charset="UTF-8" src="/js/app.out/ui/parse/routes.js?zx=152jvlqd1ell"></script>
  <script type="text/javascript" charset="UTF-8" src="/js/app.out/ui/main.js?zx=2yvaq9m9xlra"></script>
  <script type="text/javascript" charset="UTF-8" src="/js/app.out/ui/views/campaign_detail.js?zx=oq0sdtqyldgo"></script>
  <script type="text/javascript" charset="UTF-8" src="/js/app.out/ui/main.js?zx=8tiljqdeee8i"></script>
  <script type="text/javascript" charset="UTF-8" src="/js/app.out/ui/views/campaign_detail.js?zx=agdm71jxsatw"></script>
  <script type="text/javascript" charset="UTF-8" src="/js/app.out/ui/main.js?zx=kjlzljkgdu9j"></script>
  <script type="text/javascript" charset="UTF-8" src="/js/app.out/ui/views/campaign_detail.js?zx=76d2w5bv8jzx"></script>
  <script type="text/javascript" charset="UTF-8" src="/js/app.out/ui/main.js?zx=q9lylen9qckv"></script>
  </head>
@martinklepsch
Copy link
Contributor

@thos37 If I understand correctly this would affect everyone and make things break for everyone?

What version of boot-reload are you using? I haven't encountered an issue like this in my own usage before.

@Deraen
Copy link
Contributor

Deraen commented Nov 27, 2015

Please describe the real problem, not presumed cause.

@thosmos
Copy link
Author

thosmos commented Nov 27, 2015

In my code I have a line like:

[:div.col-sm-4 [:div "hello world 3"]]

When I change the hello world string and save the file, new js entries are added to the html file, but the string itself does not change unless I reload the browser. This is inside of an Om.Next component.

What I'm hearing from you guys is that it's very unlikely to be a problem with boot-reload and is most likely some other aspect of my rendering process. I'll attempt to duplicate the problem with a simpler test case.

@Deraen
Copy link
Contributor

Deraen commented Nov 27, 2015

@thos37 So probably your code is split to separate files and you are not changing the file with om/add-root! call. Boot-reload doesn't currently work as well as Figwheel as it doesn't load the dependant namespaces when you change a file. You can use on-jsload option to make sure add-root is called.

#45

@thosmos
Copy link
Author

thosmos commented Nov 27, 2015

Thanks guys for taking a look at it and sorry for jumping to conclusions. The stack of includes threw me. I had my render function inside of a (defn main) which was only called on first load. Calling render from on-jsload fixed it.

@thosmos thosmos closed this as completed Nov 27, 2015
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

3 participants