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

0.8 release #307

Closed
4 of 6 tasks
Deraen opened this issue Jul 31, 2017 · 17 comments
Closed
4 of 6 tasks

0.8 release #307

Deraen opened this issue Jul 31, 2017 · 17 comments
Milestone

Comments

@Deraen
Copy link
Member

Deraen commented Jul 31, 2017

  • Run tests both with Cljsjs and node modules, currently only run with one? and not sure which
  • Provide upgrade guide which lists different environments: https://github.com/reagent-project/reagent/blob/master/docs/0.8-upgrade.md
  • Update README.md to remove mentions of :exclusions and provide new documentation
    on how to use
    • React addons (that is, use separate Cljsjs or npm packages, react-with-addons in deprecated)
    • additional React packages
    • ...
  • Validate how additional React packages work with this change, both Cljsjs and npm
  • wait for Re-natal project (or someone) to validate how this will work with React-native: Upcoming changes in reagent 0.8.0 drapanjanas/re-natal#128
  • Validate how this works on projects that target both Node and browser, and want to use foreign-libs on browser
@Deraen Deraen added this to the 0.8.0 milestone Jul 31, 2017
@iku000888
Copy link

iku000888 commented Aug 16, 2017

Hi @Deraen

Thanks for the work on reagent!

Just wanted to throw my 2 cents that 0.8.0-alpha1 does not work with devcards (ver 0.2.3) as it directly requires react as cljsjs.react (I think?).

I am speculating that it should be fine as long as devcards updates to require cljsjs.react the same way as the latest reagent does, but not sure at the moment.

update: Dug a bit deeper and I just had to exclude cljsjs/react and cljsjs/react-dom from devcards to make sure I was using the latest cljsjs/react... Sorry for the noise...

@Deraen
Copy link
Member Author

Deraen commented Aug 29, 2017

I have opened PRs on other projects so make them work with global-exports and module-processing also:

bhauman/devcards#127
tonsky/rum#148
r0man/sablono#175
omcljs/om#887

We have some ideas still that might make the change easier and "less-breaking".

@Frozenlock
Copy link

I tried to upgrade a project to 0.8.0-alpha1 and use a react library with :npm-deps.
It works for development (figwheel), but fails when trying to use advanced compilation.

If it can help :
The errors in the browser

An example of the numerous warnings when compiling:

Aug 30, 2017 4:16:11 AM com.google.javascript.jscomp.LoggerErrorManager println
WARNING: <<<path-to-my-project>>>/target/uberjar/node_modules/react/lib/ReactChildren.js:41: WARNING - dangerous use of the global this object
  this.result = mapResult;
  ^^^^

@Deraen
Copy link
Member Author

Deraen commented Aug 30, 2017

@Frozenlock Which React and Cljs versions did you try?

@Frozenlock
Copy link

[org.clojure/clojurescript "1.9.908"]

:npm-deps 
{:react "15.6.1"
 :react-dom "15.6.1"
 :create-react-class "15.6.0"
 :react-sortable-hoc "0.6.7"}

@Deraen
Copy link
Member Author

Deraen commented Aug 30, 2017

@Frozenlock Can you try without react-sortable-hoc? It is possibile that ReactChildren file is only included in build when using that.

@Frozenlock
Copy link

Frozenlock commented Aug 30, 2017

Same thing :-(
And it's not only ReactChildren, there are hundreds of warnings.

The only way I can get the advanced compilation to work again is to delete the node_modules directory.

edit : And remove everything in :npm-deps

@Frozenlock
Copy link

New problem in 8.0 alpha2 :

When updating projects from clojure 1.8 to 1.9, advanced compilation doesn't work anymore.
It appears to be related to create-react-class.

Can be tested using the reagent-template to create a new project and then updating clojure.

@Deraen
Copy link
Member Author

Deraen commented Feb 6, 2018

@Frozenlock
lein new reagent foo
update project.clj to use 0.8.0-alpha2
lein uberjar
java -jar target/foo.jar

works for me.

@Frozenlock
Copy link

@Deraen On which java version are you?
I tried downgrading on java 8 and it works, but java 9 is a problem.

@Deraen
Copy link
Member Author

Deraen commented Feb 6, 2018

I haven't tested with Java 9. Strange that Java version would affect this. Do you have any errors or information you could share?

@Frozenlock
Copy link

Like I said, it seems to be messing with the advanced compilation process.
The uberjar will complete as expected, but when opening the webpage it will show the default message "ClojureScript has not been compiled! please run lein figwheel in order to start the compiler".

In the console :

Uncaught TypeError: Cannot read property 'a' of undefined
    at hk (component.cljs:272)
    at kk (component.cljs:326)
    at Pk (component.cljs:332)
    at Mk (template.cljs:421)
    at dom.cljs:43
    at Uk (dom.cljs:20)
    at dom.cljs:44
    at dom.cljs:39
    at dom.cljs:39

Clicking on the error link (component.cljs at line 272) brings me to create-react-class.

image

@ackerleytng
Copy link

ackerleytng commented Feb 25, 2018

I'm having this problem too, and I'm on java 9. If I downgrade to reagent 0.7.0, it works

@Deraen
Copy link
Member Author

Deraen commented Feb 25, 2018

Could you try with latest ClojureScript from git?

clojure/clojurescript@8670cc4

Cljs had bug in Java 9 which caused the externs to not be read. This is not Reagent specific, and will affect any foreign libs under Java 9.

@ackerleytng
Copy link

Sorry I'm new to clojure. How should I edit project.clj to use that particular commit for clojurescript?

@ackerleytng
Copy link

It works fine with ClojureScript 1.10.238. Thanks!

@Deraen Deraen closed this as completed Apr 3, 2018
@Deraen
Copy link
Member Author

Deraen commented Apr 3, 2018

Getting close(r) to the release. I'll keep track of rest of issues using milestones https://github.com/reagent-project/reagent/milestone/2

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

4 participants