Clojurians
#cljs-dev
<
2017-03-06
>

This page is not created by, affiliated with, or supported by Slack Technologies, Inc.

danielcompton05:03:15

Could what Gradle does here be useful for ClojureScript? https://blog.gradle.org/incremental-compiler-avoidance

danielcompton05:03:37

Compile avoidance avoids recompiling consuming namespaces if the public API of a function hasn't changed

martinklepsch05:03:48

@danielcompton to summarize the approach there: the compiler analyzes the exposed API (e.g. top level defs) and only recompiles dependents if the exposed (top-level) API has changed?

danielcompton05:03:10

Yeah that's my understanding

danielcompton05:03:30

And similarly for incremental recompiles, it only recompiles namespaces that a) depend on the changed namespace, and b) used part of the public API that changed

niwinz11:03:02

Seems like https://clojurescript.org/guides/javascript-modules does not works with deps.cljs, is that expected?

dnolen15:03:54

@niwinz expected

dnolen15:03:05

since there’s no way to install that stuff

niwinz15:03:52

I'm not clearly understand that you saying. I'm asking for use of :foreign-libs (with module transformations) from deps.cljs. I found that it works if I pass :foreign-libs to the compiler, but raises an exception (like "src" is a directory) if I use the same options but from deps.cljs

dnolen15:03:21

@niwinz I do understand

dnolen15:03:28

you’re talking about an alpha thing - don’t expect much to work

dnolen15:03:18

@danielcompton that’s interesting but we might want to see what happens to spec first

ckirkendall17:03:20

I noticed a bug in cljs.test where we assume the output path for files to be in something /out/, when this is not the case it fails to get the file name for the test report. https://github.com/clojure/clojurescript/blob/master/src/main/cljs/cljs/test.cljs#L379

ckirkendall17:03:58

I can put a ticket together and patch but thought I would post it here first.

ckirkendall17:03:11

I ran across this with a client that pushed their code to js/compiled

dnolen18:03:37

@ckirkendall patch welcome

ckirkendall18:03:11

cool I was thinking just pull the last two directories above the file if they exist.

ckirkendall18:03:32

since the full path seems problematic given we don’t know the starting point

ckirkendall18:03:13

I can also detect ‘/out/’ and leave the current behavior as is if it is detected.

dnolen18:03:38

@ckirkendall I don’t think that approach is desirable

dnolen18:03:47

just get it from the compiler options

ckirkendall18:03:24

you mean get the out location directly from compiler options?

dnolen18:03:00

hrm actually I think this functionality is already too vestigial

dnolen18:03:22

this won’t handle different JS environments

dnolen18:03:38

there’s a namespace that does all this work already

dnolen18:03:41

cljs.stacktrace

ckirkendall18:03:42

yeah I have all ready noticed a few other issues with it also

ckirkendall18:03:11

I noticed that for most tests I never get any file other than cljs/test.js

ckirkendall18:03:19

async tests I get the actual file

dnolen18:03:57

hrm yeah I don’t know

dnolen18:03:06

I haven’t looked at this stuff in ages

dnolen18:03:20

was expecting other people to help out with it - was a pain the butt to do :slightly_smiling_face:

ckirkendall18:03:39

all good I may get a chance this week to sit down and look at it.

dnolen18:03:53

but feel free to open a ticket

dnolen18:03:04

would be nice for the issue to not get lost regardless of the solution