Clojurians
#lumo
<
2017-05-31
>

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

ericnormand18:05:27

hey everybody

ericnormand18:05:43

I'm getting this error when I try to run a script

ericnormand18:05:56

klipse $ lumo scripts/generate-clojure-spec-cache.cljs
Cannot find module 'nexeres'
	 Function.Module._resolveFilename (module.cljs:470:15)
	 Function.Module._load (module.cljs:418:25)
	 Module.require (module.cljs:498:17)
	 require (internal/module.cljs:20:19)
	 (evalmachine.<anonymous>:2:18)
	 ContextifyScript.Script.runInThisContext (vm.cljs:23:33)
	 Object.runInThisContext (vm.cljs:95:38)
	 (Object.lumoEval)
	 lumo.repl.caching_node_eval (NO_SOURCE_FILE <embedded>:6133:194)
	 (NO_SOURCE_FILE <embedded>:5373:29)

ericnormand18:05:33

I'm using lumo 1.5.0

ericnormand18:05:46

I am told that an older version of lumo worked with the same script

anmonteiro18:05:12

nexeres is gone

anmonteiro18:05:22

does the script rely on internal Lumo things?

anmonteiro18:05:44

oh yes it does

anmonteiro18:05:02

@ericnormand nexeres was never public API so you should expect breakage

anmonteiro18:05:08

it’s gone because I optimized a few things

anmonteiro18:05:13

I’ll PR KLIPSE

ericnormand18:05:59

I'll test it out

viebel18:05:05

@anmonteiro

viebel18:05:08

It works fine

anmonteiro18:05:17

what works fine?

viebel18:05:33

The scripts from your PR

anmonteiro18:05:52

yeah, I tested it locally, glad it works for you too

viebel18:05:59

Merged into master

viebel18:05:09

Thanks for your contribution @anmonteiro

anmonteiro18:05:23

note that this now makes KLIPSE depend on Lumo 1.4+ I think

anmonteiro18:05:36

I don’t recall exactly when I moved away from nexeres

anmonteiro18:05:07

@viebel however, note these are still internal APIs and if I find a faster alternative I’m not going to be concerned as to what breaks downstream

viebel18:05:31

That’s fine

anmonteiro18:05:34

I don’t expect them to be consumed and they’re very Lumo specific

anmonteiro18:05:39

e.g. tied to Lumo’s ClojureScript version too

viebel18:05:43

It will not break Klipse

viebel18:05:05

It will break only the script that generates the analysis cache that Klipse uses

viebel18:05:26

I guess that the cached files are still the same. right?

anmonteiro18:05:46

yes, but dependent on the ClojureScript version they were compiled with

anmonteiro18:05:00

so for Lumo 1.5, CLJS 1.9.542

viebel18:05:19

Makes senses

viebel19:05:48

I’m trying to require ‘om.core inside lumo

viebel19:05:04

And it fails because it cannot require cljsjs.react

viebel19:05:25

I remember that it used to work

viebel19:05:33

@anmonteiro any idea about :arrow_up: ?

anmonteiro19:05:58

@viebel I think I broke foreign libs in 1.5. Can you try brew install --HEAD lumo?

anmonteiro19:05:17

I can also link you a built binary if you'd prefer

viebel19:05:59

I’m trying with brew

viebel19:05:21

Is there a way to skip the requiring of a lib

viebel19:05:40

I mean to mark the lib as already loaded

viebel19:05:31

Something like goog.provide()

viebel20:05:11

@anmonteiro installed lumo from HEAD

viebel20:05:16

issue still there

anmonteiro20:05:06

are you adding react to the classpath

viebel20:05:48

what do u mean @anmonteiro ?

anmonteiro20:05:05

lumo -c /path/to/cljsjs/react.jar?

anmonteiro20:05:40

you need to specify the full transitive classpath

viebel20:05:53

react is in the classpath

viebel20:05:16

@anmonteiro By the way, it works fine with Lumo 1.1.0

anmonteiro20:05:05

it should also work with Lumo from master, unless you uncovered another bug

anmonteiro20:05:35

@viebel can you paste the output of starting lumo?

viebel20:05:18

here you go

viebel20:05:23

lumo -k . -c $cp
Lumo 1.5.0
ClojureScript 1.9.542
Node.js v7.10.0
 Docs: (doc function-name-here)
       (find-doc "part-of-name-here")
 Source: (source function-name-here)
 Exit: Control+D or :cljs/quit or exit

cljs.user=> (require 'cljsjs.react)
Could not require cljsjs.react
         (new)
         Function.cljs.core.ex_info.cljs$core$IFn$_invoke$arity$3 (NO_SOURCE_FILE <embedded>:1937:200)
         Function.cljs.analyzer.error.cljs$core$IFn$_invoke$arity$3 (NO_SOURCE_FILE <embedded>:2484:92)
         (NO_SOURCE_FILE <embedded>:5237:40)
         Object.cljs.js.run_async_BANG_ (NO_SOURCE_FILE <embedded>:5217:173)
         Object.cljs.js.process_deps (NO_SOURCE_FILE <embedded>:5217:244)
         Object.cljs.js.process_libs_deps (NO_SOURCE_FILE <embedded>:5219:60)
         (NO_SOURCE_FILE <embedded>:5235:358)
         Object.cljs.js.run_async_BANG_ (NO_SOURCE_FILE <embedded>:5217:173)
         Object.cljs.js.process_deps (NO_SOURCE_FILE <embedded>:5217:244)

Unexpected identifier
         createScript (vm.cljs:53:10)
         Object.runInThisContext (vm.cljs:95:10)
         (Object.lumoEval)
         lumo.repl.caching_node_eval (NO_SOURCE_FILE <embedded>:6133:194)
         (NO_SOURCE_FILE <embedded>:5236:153)
         Object.cljs.js.run_async_BANG_ (NO_SOURCE_FILE <embedded>:5217:173)
         Object.cljs.js.process_deps (NO_SOURCE_FILE <embedded>:5217:244)
         Object.cljs.js.process_libs_deps (NO_SOURCE_FILE <embedded>:5219:60)
         (NO_SOURCE_FILE <embedded>:5235:358)
         Object.cljs.js.run_async_BANG_ (NO_SOURCE_FILE <embedded>:5217:173)

anmonteiro20:05:38

@viebel you’re not using lumo from HEAD

anmonteiro20:05:52

brew uninstall lumo && brew install --HEAD lumo

anmonteiro20:05:04

or, hey, are you on a mac?

viebel20:05:21

Actually I did brew unlink lumo && brew install --HEAD lumo

viebel20:05:22

downloading it…

viebel20:05:59

By the way @anmonteiro : Is there a way to skip the requiring of a lib inside lumo?

viebel20:05:28

I mean to mark it as already resolved

viebel20:05:43

For Klipse, I just need to generate the analysis cache with lumo

viebel20:05:11

with lumo from HEAD => (require 'cljsjs.react) works fine :slightly_smiling_face:

anmonteiro21:05:17

@viebel what do you mean by skip requiring it

richiardiandrea22:05:35

rehashing an old question: is there something akin to *clojure-version* in lumo?

richiardiandrea22:05:53

for understanding if I am in a lumo repl

anmonteiro22:05:21

cljs.user=> (require '[lumo.core :refer [*lumo-version*]])
nil
cljs.user=> *lumo-version*
"1.5.0"

richiardiandrea22:05:45

uhm that is great, two instructions though are a bit tough to handle for inf-clojure and I was wondering whether there is a one instruction check I can do

richiardiandrea22:05:14

well this works:

cljs.user=> (require '[lumo.core :refer [*lumo-version*]]) *lumo-version*
nil
"1.5.0"

richiardiandrea22:05:54

maybe we could move the *lumo-version* to an already required namespace? what do you think Antonio?

anmonteiro22:05:03

cljs.user=> (do (require '[lumo.core :refer [*lumo-version*]]) *lumo-version*)
"1.5.0"

anmonteiro22:05:34

@richiardiandrea what about this? ^

richiardiandrea22:05:15

it is good, however the point of moving is still valid because it kind of make sense to have it always visible...

anmonteiro22:05:40

@richiardiandrea please open an issue so we can discuss the cost of auto-referring lumo.core