Fork me on GitHub
#calva
<
2019-04-06
>
dabrazhe07:04:14

Is anyone here is at Clojuredays in Amsterdam?

pez07:04:47

I wish i were!

hoppy12:04:26

I have been chasing the craziest thing. I have a file that is a namespace called ace2.legacy.timetrak.timetrak

hoppy12:04:57

it goes bonkers when I try to eval the file, calva (snapshot) won't switch namespace to it, (goes to user=>), and evaling functions in it just breeds nonsense. if I move the code to a different namespace (e.g. ace2.legacy.timetrak.ttio), things seem to go sane again.

hoppy12:04:29

all of this is code that clojure compiles perfectly, and other similar files in the project seem to work fine. It's weird.

hoppy12:04:47

aside from that, the preview version has been a champ on my desktop for about a week now. I don't appreciate that Im not getting hostile messages when a file can't be eval'ed, but other than that, and this, it's going well.

hoppy12:04:26

I'm repeating the process to convince myself it's the namespace at the source

hoppy12:04:25

yup, moving all the code to a new filename and new namespace changes it all. very weird

pez13:04:53

The new preview should be giving you the hostile messages you are lacking.

pez13:04:47

About that craziest thing. Calva has some really naive code for parsing out the ns of the file. It sounds like that is the problem.

hoppy13:04:19

I'm on 1.3.65-SNAPSHOT. I pulled the repo (branch pez/repl_jack-in) earlier today and didn't see anything moving since 3/19

hoppy13:04:33

should I be pulling a different branch?

hoppy13:04:50

something wacky in git-town. disregard

hoppy13:04:50

oops, my dopey self forked it. w00ps

pez14:04:15

It has started moving some. Can get to be a bumpy ride ahead.

hoppy14:04:00

what is the missing link to get to a .vsix

hoppy14:04:14

(warned ya I'm a noob)

pez14:04:06

vsce package

hoppy14:04:17

that a command or a npm thing?

hoppy14:04:25

or am I missing a hunk of something

pez14:04:43

npm i -g vsce

pez14:04:15

You also need to run npm i.

hoppy14:04:30

jup, perfect. thanks

hoppy15:04:16

came up, no repl prompt

pez15:04:33

Strange. Run it in the debugger and see if you can catch what goes wrong. I might have borked it earlier today.

pez15:04:22

I have seen that error before. Can't make sense of it...

hoppy15:04:17

I'm not sure I understand how to kick up the debugger on calva extension while I'm looking at my directory.

hoppy15:04:41

that was just from console log

pez15:04:26

It’s straightforward. Open the root of the project in vscode. Run the build task (`cmd+shift+b`) Watch CLJS and wait for shadow-cljs to build its things and run tests. Then run the build task Watch TS and wait (much shorter) for it to build its things. Then press F5.

pez15:04:41

Then you can place breakpoints in the TS code. And for the CLJS code you have Calva. 😃

hoppy15:04:49

ok, so I think I got through that. I'm bascially left with a VSC window debugging the typescript, and I open my mess in the Extension Development host

hoppy15:04:54

which I did

hoppy15:04:13

and naturally the prompt works over there (yay)

pez15:04:13

Home and able to try it too. I also get the prompt, and that error message.

hoppy15:04:43

yes the error message is still there for me as well

hoppy15:04:30

I'm actually trying to use this in anger at this point

pez16:04:13

Dear channel, here’s a new preview build of Calva 2. It has the beginnings of a working jack-in. There are really rough edges to it and it doesn’t allow you to customize the commands used to start the REPL so will not work in all projects. I have tested it (very briefly) on shadow-cljs and leiningen+figwheel projects. It might work for cli/deps as well, but that is untested.

pez16:04:35

If you pull in my branch from upstream, @hoppy, you should be able to build it using the latest jack-in changes. What’s new is that we now use the cljs.reader for parsing edn files, which is premium edn parsing, and a lot better than that jsedn stuff we used before.

pez16:04:15

Welcome @vcastro70 ! Thanks again for the help with the new vscode issue.

hoppy16:04:16

welcome to happy-land. The jack-in stuff worked like a champ, even on this monster

hoppy16:04:36

proper griping on file load errors

hoppy16:04:44

very nice work

❤️ 1
hoppy16:04:19

somebody must have changed the font in the repl window, my eyes aren't bleeding anymore

hoppy16:04:11

I'll go back and build a package and see if I can isolate that missing prompt debacle

hoppy16:04:26

we lost the prompt when I packaged. Im' going to try yours

hoppy16:04:12

your build of it is good - must be something in my world.

hoppy16:04:26

(arch linux if that's a clue)

pez17:04:04

Try it again, might have been a fluke.

pez17:04:27

Or, more probable, some bug lurking that only shows up at times.

pez17:04:34

About the font. It's Fira-CODE. Only the size charged.

hoppy18:04:53

predictable outcome

hoppy18:04:21

I notice when I unzip my package and yours and diff them, it appears that your npm is getting some newer stuff out of the ether than mine.

hoppy18:04:29

are you on some hotshot repo?

hoppy18:04:01

maybe its a timezone thing.... (;->

hoppy18:04:07

and my vscode was lagging goin to 1.33.0 now

pez18:04:24

The mystery might be around what newer stuff I have, compared too you.

hoppy18:04:58

or maybe the reverse

hoppy18:04:22

I start my build with git clean -dxf, so I don't have anything in the attic

hoppy18:04:28

updated vs/chrome/entire system - persists

hoppy18:04:09

I'm find using your build, it's just a gnawing curiosity.

hoppy18:04:41

and I'd be interested in understanding why it works when I'm debugging it, but not when I install a .vsix I made on the same system. Stumped.

pez18:04:24

We build the style sheets with node-sass. And that is since very recent. Might be something around that.

pez19:04:18

@hoppy, can you post the first lines of that ace2.legacy.timetrak.timetrak file? Or, if it’s open source, just post a link. 😃

Saikyun19:04:49

hello @pez, how do I eval into the fancy calva repl?

Saikyun19:04:19

nvm I figured it out

Saikyun19:04:59

next question; it asked me to delete paredit. but now how do I use paredit? 😞

Saikyun20:04:33

basic eval file/form works fine using calva + arcadia, that's neat 🙂

Saikyun20:04:44

go to definition doesn't seem to work (I believe it does work in cider). I get this error message. do you know what information is missing @pez? https://memset.se/8333/9ac59bb9e9a22ab6842576eeb564cabfd29ae585

Saikyun20:04:41

tried it in cider, it almost works, and if nothing else it gets all information needed : >

Saikyun20:04:17

I'm guessing scheme needs to be something else than an empty string?

Saikyun20:04:45

something I didn't consider is that since vs code is top 2 best editors for c# in unity; if you manage to get calva + arcadia working properly it would probably be a really good development experience

❤️ 1
Saikyun20:04:15

calva + arcadia would probably be better than calva + clojure jvm 🙂

sparkofreason21:04:17

When I eval inline and get an exception, is there a way to view more of the output? It's currently truncating the useful info. I can eval in the terminal repl and get the whole thing, just wondering if there was a way to do it inline.

pez21:04:04

@dave.dixon , that's really annoying, and we'll fix it. I'd say it is high priority, but can't give an ETA. As we are preparing for releasing a much improved REPL window, that displays more helpful stack traces, maybe it would be a good idea to use that one for when inline evals render exceptions...

1
pez21:04:46

Did you figure out how to paredit, @saikyun ?

hoppy21:04:01

note that some knucklehead (probably me) ended up with clj-time.core in there twice, which I initially thought was contributing. But it wasn't

pez21:04:30

Yeah, so that is definitely stupid Calva code for figuring out the ns that makes that fail. We must fix that, @mseddon

dominicm05:04:45

Might be worth looking at the fireplace regex, I've found it to be surprisingly reliable.

pez06:04:52

Thanks. I'll check it out.

hoppy21:04:05

I think you have in the preview. It is no longer being naughty

pez07:04:22

Interesting. I don't recall touching that, but the regex does look more solid now than it used to. Well, please stay on the lookout for similar problems.

hoppy21:04:58

also let me know if there are any experiments you want me to try about the missing prompt, since I'm the only one having that issue (so far).