Fork me on GitHub
#cljs-dev
<
2019-06-04
>
metametadata01:06:30

Hello. I want to create a project example demonstrating a compiler bug. Is there a template empty project somewhere on Github with minimal tooling as described e.g. in Quick Start? Didn't find such thing in (the closest is mies but it looks outdated).

mfikes01:06:38

@metametadata In general, no templates are necessary and Quick Start is often sufficient. Many problems you can repro directly in the REPL, but if you need to set up files, etc, you can do that as well. Here is an example ticket https://clojure.atlassian.net/projects/CLJS/issues/CLJS-2767

metametadata01:06:52

Thanks! Yes, REPL was not enough, had to follow the Quick Start manually. Which took only a few minutes, but still 🙂

Filipe Silva09:06:46

what is the CI for clojurescript?

Filipe Silva09:06:02

in https://build.clojure.org/ I see CI tracks for clojure (builds and tests) and clojurescript-release (just builds I think), but none for just clojurescript with test results

Filipe Silva09:06:08

https://github.com/clojure/clojurescript/ contains travis and appveyor information, but as far as I can tell those aren't being ran

Filipe Silva09:06:25

at least https://travis-ci.org/clojure/clojurescript says the repository isn't active

Filipe Silva09:06:11

there was still an update to travis config in https://clojure.atlassian.net/browse/CLJS-3088, that went in 25 days ago as https://github.com/clojure/clojurescript/commit/c4a5120294aa83b8f69d35ce10e5d03c951d99ea and is the last commit in the repo

Filipe Silva09:06:08

but I can't find the travis results for it..

Filipe Silva09:06:34

@mfikes do you know where travis results are shown?

Filipe Silva09:06:44

ok that shows what I was looking for...

Filipe Silva09:06:15

but the travis run, although shown as passing, has failures

Filipe Silva09:06:01

- Error: Can't resolve './calculator' in '/home/travis/build/mfikes/clojurescript' at https://travis-ci.org/mfikes/clojurescript/builds/540710982#L2084 - Error: Cannot find module '@cljs-oss/module-deps' at https://travis-ci.org/mfikes/clojurescript/builds/540710982#L2931 - ReferenceError: test is not defined at https://travis-ci.org/mfikes/clojurescript/builds/540710982#L3441

Filipe Silva09:06:38

I also see a lot of warnings there but don't have the sensitivity to understand which ones are serious

Filipe Silva09:06:30

I'll add the CI failures info to CLJS-3088

Filipe Silva09:06:22

are you looking to improve the CI setup for clojure/clojurescript? I'm very familiar with the current OSS providers, and think azure pipelines would be a good choice (generous free tier, linux, osx, and best-in-class windows offer)

Filipe Silva14:06:03

@souenzzo I don't think that's quite the same. If I understand that repository correctly, it is testing several community projects against CLJS builds. But that is different than the tests in the CLJS repository proper. Ideally, failures in the CLJS CI test suite would be addressed before generating a build for cljs-oss/canary.

lread16:06:13

@filipematossilva usually what look like failures in output from tests are not really failures, but like you I am new to cljs-dev and wondered about these.

Filipe Silva16:06:11

@lee I agree with you that often test logging isn't very obvious, and that tests that simulate failures will look like failed tests

Filipe Silva16:06:26

but I don't think that's the case here

lread16:06:59

interesting. looking forward to hearing more from those who know more!

Filipe Silva16:06:04

the travis config includes a few of these tests

Filipe Silva16:06:06

- jsc builds/out-adv/core-advanced-test.js | tee test-out.txt
  - grep '0 failures, 0 errors.' test-out.txt
  - ./spidermoney/js -f builds/out-adv/core-advanced-test.js | tee test-out.txt
  - grep '0 failures, 0 errors.' test-out.txt
  - ./ChakraCoreFiles/bin/ch builds/out-adv/core-advanced-test.js | tee test-out.txt
  - grep '0 failures, 0 errors.' test-out.txt

Filipe Silva16:06:45

they follow the same pattern: run a js file through a JS engine, pipe to test-out.txt, grep the output

Filipe Silva16:06:10

but consider what happens when the execution fails

Filipe Silva16:06:51

the snippet above shows that a js script whose execution fails exits as 1 when ran through an engine, but exits as 0 when ran through an engine and piped to test-out.txt

lread16:06:10

I think they are grepping because some js engines return 0 even on failure.

Filipe Silva16:06:15

so if the js execution fails, the exit code is still 0, and the grep still succeeds

Filipe Silva16:06:56

actually sorry, I am wrong: the grep does not succeed in that case

Filipe Silva16:06:35

it's just the js script execution that exits as 0

Filipe Silva17:06:20

tested and I was wrong on this too, the script might show an error but does not exit with 1

Filipe Silva17:06:39

[email protected]:/src# ./ChakraCoreFiles/bin/ch builds/out-adv/core-advanced-test.js

Testing cljs.apply-test

Testing cljs.primitives-test

Testing cljs.destructuring-test

Testing cljs.new-new-test

Testing cljs.printing-test

Testing cljs.seqs-test

Testing cljs.collections-test

Testing cljs.hashing-test

Testing cljs.core-test
{:result true, :num-tests 10, :seed 1559669193687, :time-elapsed-ms 26, :test-var "boolean-test"}

Testing cljs.reader-test

Testing clojure.string-test
{:result true, :num-tests 100, :seed 1559669196098, :time-elapsed-ms 75, :test-var "test-cljs-2300"}

Testing clojure.data-test

Testing clojure.datafy-test

Testing clojure.edn-test

Testing clojure.walk-test

Testing cljs.letfn-test

Testing cljs.reducers-test

Testing cljs.binding-test

Testing cljs.macro-test

Testing cljs.top-level

Testing cljs.keyword-test

Testing cljs.ns-test

Testing cljs.ns-test.foo

Testing foo.ns-shadow-test

Testing cljs.import-test

Testing cljs.pprint

Testing cljs.spec-test

Testing cljs.spec.test-test

Testing cljs.clojure-alias-test

Testing cljs.hash-map-test

Testing cljs.map-entry-test

Testing cljs.metadata-test

Testing cljs.npm-deps-test

Testing cljs.pprint-test

Testing cljs.predicates-test

Testing cljs.syntax-quote-test

Testing cljs.tagged-literals-test

Testing cljs.test-test

Testing static.core-test

Testing cljs.recur-test

Testing cljs.array-access-test

Testing cljs.inference-test

Testing cljs.walk-test

Testing cljs.extend-to-native-test

Ran 472 tests containing 19651 assertions.
0 failures, 0 errors.
ReferenceError: 'test' is not defined
   at Anonymous function (/src/builds/out-adv/core-advanced-test.js:7074:482)
   at Global code (/src/builds/out-adv/core-advanced-test.js:14:3)
[email protected]:/src# echo $?
0

Filipe Silva16:06:56

I agree with you, these aren't ignored failures, the commands never exit 1 on the CI

lread16:06:13

cool. I have not looked at azure pipelines at all. I guess the big advantage over other offerings is windows support.

Filipe Silva17:06:27

you can get windows support these providers currently: appveyor, travis (limited preview), circleci (limited preview), codefresh (fairly new), azure pipelines

Filipe Silva17:06:34

they are usually quite expensive though

Filipe Silva17:06:11

since azure gives you a bunch of parallel builds for free, that helps

lread17:06:18

Seems like you know the landscape! simple_smile Do you see any disadvantages with azure pipelines?

Filipe Silva17:06:52

hmmm no cache or docker support on azure

Filipe Silva17:06:16

also no ssh support, which only circleci has but is very good to debug problems in-situ

metametadata20:06:43

Is compiler expected to respect the order of required ns-es in :require form? I've stumbled upon the issue because the relative order is not respected: https://github.com/metametadata/cljs-require-order-bug.

thheller20:06:39

there is an open issue about that. forgot the number and the JIRA search is horrible and doesn't find it

metametadata20:06:20

awesome, thank you!

metametadata20:06:29

(initially I tried to google if there's a similar issue but found nothing)