Fork me on GitHub
#cljs-dev
<
2016-08-30
>
anmonteiro14:08:40

@juhoteperi did you get far in your GCC bump patch?

anmonteiro14:08:09

I’m back from vacation now, so I could probably spend a few cycles trying to get that to work

juhoteperi14:08:26

@anmonteiro Haven't had much time to look since Saturday.

juhoteperi14:08:24

But at least one problem is that Compiler moduleLoader is set by parseFiles method: https://github.com/google/closure-compiler/blob/master/src/com/google/javascript/jscomp/Compiler.java#L1427

juhoteperi14:08:32

and we are not calling parse (which calls parseFiles)

juhoteperi15:08:20

and ProcessCommonJSModule calls CompilerInput getUri which requires that Compiler has moduleLoader: https://github.com/google/closure-compiler/blob/maven-v20160822/src/com/google/javascript/jscomp/CompilerInput.java#L395

anmonteiro22:08:39

@juhoteperi hrm pretty sure I got it to work just now

juhoteperi22:08:52

hmm interesting

anmonteiro22:08:55

I’ll attach a patch for your review

anmonteiro22:08:13

double-checking first by cleaning the build

juhoteperi22:08:55

I've been tinkering with this for some time and looks to me that convert-js-module would need quite refactor, but perhaps I'm completely off track

anmonteiro22:08:19

OK I must have had a cached build

anmonteiro22:08:28

looks like it’s failing, false alarm 🙂

juhoteperi22:08:32

I'll push my notes to github in few minutes

anmonteiro22:08:40

sure, thanks

juhoteperi22:08:45

Looks like we need to call Compiler .parse now instead of ProcessCommonJSModules .process

rads22:08:47

I'd like to start my first contribution to ClojureScript. are there any particular issues I can help out with? or should I just start looking here? http://dev.clojure.org/jira/browse/CLJS

anmonteiro22:08:06

@juhoteperi yeah, that was my first attempt

juhoteperi22:08:26

but parse will process all source-files etc. which causes problems

anmonteiro22:08:30

I got this: ERROR: JSC_PARSE_ERROR. Parse error. primary expression expected at resources/public/js/libs/Circle.js line 6 : 7

juhoteperi22:08:11

that is because get-source-files returns a CompilerInput without the JSX processing

anmonteiro22:08:47

yeah, does it need to perform transforms earlier?

anmonteiro22:08:51

I’m going through your notes now

juhoteperi22:08:27

probably, unless there is some way to process single files like before

juhoteperi22:08:08

but I guess parsing has to be done to all files at once so that the moduleLoader can keep track of existing modules

anmonteiro22:08:00

@juhoteperi yeah but it didn’t previously, or did it?

anmonteiro22:08:24

@rads I think there are some CLJS issues in JIRA with the tag newbie

anmonteiro22:08:27

you could start there

juhoteperi22:08:40

@anmonteiro There could be some reason why some new features require this, or maybe it is just implementation detail and they haven't though about projects using Closure as library

anmonteiro22:08:43

@juhoteperi spending a few more minutes with your notes looks like you’re on the right track

anmonteiro22:08:42

it looks to me that solving the js-transforms problem would give us an initial solution

juhoteperi22:08:51

trying that currently

anmonteiro22:08:51

although, and as you correctly noted, it would be n^2

anmonteiro22:08:24

n^2 with respect to the number of foreign deps

juhoteperi22:08:04

I wonder if ES6 modules can require CommonJS modules and other way round

juhoteperi22:08:11

And what about AMD & CommonJS

anmonteiro22:08:18

I’m not qualified to answer that question 😄