Hey! Is it necessary for Joyride to “greet” me on start? Whenever I open a project, it opens the “output” panel with output like:
🟢 Joyride VS Code with Clojure. 🚗
User activate script: ~/.config/joyride/scripts/activate.cljs
No User activate script present
Workspace activate script: .joyride/scripts/activate.cljs
No Workspace activate script present
This is a bit distracting and I would prefer it to stay in the backgroundWe can consider this. However, it is also a way to inform about what's going on, especially in the beginning of this project when things change around a bit...
I've just push a PR which stops this channel from popping up on every script invokation, and that also gives scripts access to the channel, so that they can show it at will. Here's an example use:
(doto (joyride/get-output-channel)
(.show true)
(.append "Writing to the ")
(.appendLine "Joyride output channel.")
(.appendLine (str "Joyride extension path: "
(-> (joyride/get-extension-context)
.-extension
.-extensionPath)))
(.appendLine (str "joyride/*file*: " joyride/*file*))
(.appendLine (str "Invoked script: " (joyride/get-invoked-script)))
(.appendLine "🎉"))Thanks! I understand it makes sense for “active users” to see what’s going on. I installed it to give a try one day and did not get around to it yet, so I’m probably a different user group 🙂
I'm thinking this could be used in the following way to implement a ”setting” for if the channel should pop up at start or not:
• We add a default User scripts activate.cljs when Joyride is installed.
• This script has (.show (joyride/get-output-channel) true) in it.
Then you can edit this script to get the behaviour you want. And you would be activated as a Joyrider while doing so. Moahahaha!
Sneaky! I like it 🙂
I am getting to the point where I was probably going to ask for a way to turn this off in the next week or so -- glad to see it already being requested and a potential solution being considered! 🙂
User activate script: /Users/fbeyer/.config/joyride/scripts/activate.cljs. Running...
Welcome Joyrider! This is your User activation script speaking.
Tired of this message popping up? It's the script doing it. Edit it away!
Thanks! ❤️Finally getting into joyride! I’m running into an issue with the https://github.com/BetterThanTomorrow/joyride/blob/master/examples/.joyride/scripts/activate.cljs though, when I try to evaluate the file I get Could not resolve symbol: joyride/extension-context. I see that there’s a joyride/get-extension-context, but if I try to run that I get:
; Extension 'betterthantomorrow.joyride' CANNOT use API proposal: extensionRuntime.
; Its package.json#enabledApiProposals-property declares: [] but NOT extensionRuntime.
The missing proposal MUST be added and you must start in extension development mode or use the following command line switch: --enable-proposed-api betterthantomorrow.joyride
Is there a setup step I missed?The examples are out of sync with what is released, unfortunately. Do you get that error message when you evaluate the call?
https://clojurians.slack.com/archives/C03DPCLCV9N/p1652120691016889?thread_ts=1652120324.988989&cid=C03DPCLCV9N, the issue appears only when trying to print the context. If you just def it there’s no error
Thanks for making Joyride! I’m having fun playing with it
Cool. That’s what I was trying to figure out. We should write something about that.
@max.r.rothman This var has been renamed on master, the old one is still get-extension-context
this will change on the next release though (sorry, still work in progress)
no worries, I saw the WIP warning 😛
Any idea why running get-extension-context is failing?
@max.r.rothman It fails if you print the result, just don't print it, but (def x (get-extension-context)) should work. This probably needs some docs though
aaaah, got it, thanks!
Dear Joyride friends. A new release is out:
• https://github.com/BetterThanTomorrow/joyride/issues/4
• https://github.com/BetterThanTomorrow/joyride/issues/36
• https://github.com/BetterThanTomorrow/joyride/issues/42`joyride.core/get-`https://github.com/BetterThanTomorrow/joyride/issues/42
• https://github.com/BetterThanTomorrow/joyride/issues/43`*1`https://github.com/BetterThanTomorrow/joyride/issues/43`*2`https://github.com/BetterThanTomorrow/joyride/issues/43`*3`https://github.com/BetterThanTomorrow/joyride/issues/43`*e`https://github.com/BetterThanTomorrow/joyride/issues/43
You might want to pay extra attention to the API break with the naming of some joyride.core functions, where https://stuartsierra.com/2016/01/09/how-to-name-clojure-functions on my use of get- prefixes.