Fork me on GitHub
#cljs-dev
<
2015-08-10
>
dnolen14:08:08

@juhoteperi: before I forget yes, exposing the dep graph stuff is a find idea for the public api

juhoteperi14:08:26

@dnolen: Okay. I’ll create patch for that. Do you have option whether foreign-deps (or goog files) should be exposed in the graph?

dnolen15:08:47

@juhoteperi: I think a patch that exposes the entire dependency graph is the only one what makes sense.

dnolen15:08:10

how we deal with various kinds of dependencies need to remain internal otherwise people will break when things change

dnolen15:08:27

or have a challenging time replicating behavior

dnolen15:08:22

before producing a patch there should be a basic plan in place

juhoteperi15:08:22

Cljs part of graph is already quite easy to construct using all-ns and (proposed) ns-dependencies

juhoteperi15:08:57

Foreign-dep and closure data is available in :js-dependency-index and I think there is no useful functions for accessing that yet

dnolen15:08:41

@juhoteperi: right so for the public api we should present a merged view

dnolen15:08:54

directly exposing how things are internally is not something I’m interested in

dnolen15:08:13

again the changes to cljs.analyzer.api and cljs.compiler.api are good models

dnolen15:08:52

cljs.env/default-compiler-env -> empty-state, stuff like that

dnolen15:08:52

so I would write up the names and approach in the ticket when you have something and I can review that

dnolen15:08:03

once we have something we’re happy with then proceed on patch.

crisptrutski20:08:01

i’ve tracked the doseq bug (CLJ 1400) to shadowing and munging, only affecting the :context :statement and bootstrapped combination of a :loop essentially inside the while loop the sequence name is munged differently, hence the step functions don’t advance i’m a little bit stuck at this point, haven’t really figured out a good flow for debugging this (and println debugging is out the window in the emitter) might be quicker for me to show what i’ve found to someone who understands those portions better?

dnolen20:08:52

@crisptrutski: println debugging can work, we split normal printing from error printing for this exact purpose

dnolen20:08:57

see cljs.js/debug-prn

dnolen20:08:29

the other option is to use Cursive or Chrome DevTools to step debug

crisptrutski20:08:51

tried using cursive with the node repl, but got issues with loading cljs.js - expected window global

crisptrutski20:08:07

didn’t manage to figure out connecting to the browser repl - xpc parameter?

dnolen20:08:36

Cursive w/ Node.js REPL definitely works, should be simpler to if you use master thanks to a couple of recent commits

dnolen20:08:42

this is what I use to debug.

dnolen20:08:50

the window/global thing should not be present anymore

crisptrutski20:08:59

must have had a stale checkout, thanks

dnolen20:08:25

but println debug is also simpler simple_smile so try cljs.js/debug-prn too

dnolen20:08:28

@mfikes: lets keep tagging bootstrapped issues

dnolen20:08:46

while they are a priority, it’s nice to keep them separate from things that affect everyone

mfikes20:08:13

You’d prefer to have JIRA tagged with “bootstrapped” and not cljs.js in the title?

mfikes20:08:28

Oh… you mean tag as in “tag team”

dnolen20:08:42

no I just mean tag

dnolen20:08:46

like “newbie” “bootstrap"

dnolen20:08:21

@mfikes: putting self-host in the title is fine too

dnolen21:08:48

@mfikes: ah that defprotocol issue, might want to try locally with core/-> instead of ->, if that works patch + test welcome

mfikes21:08:30

@dnolen: cool. Will take care of it

dnolen21:08:36

@mfikes what’s happening is that defmacro does not work inline at all, ClojureScript bootstrapped just sees a function

dnolen21:08:01

so it’s trying to call -> as a normal function and of course that won’t work because macros need to take 2 extra params

dnolen21:08:01

and the reason the -> isn’t getting resolved in this case … because we exclude all that at the top

dnolen21:08:54

so -> gets defined (macros are just functions), -> is excluded, so resolves to the local fn, tries to call it with wrong number of arguments