Fork me on GitHub
#babashka
<
2020-10-06
>
Markus Agwin16:10:32

I made bb fork that includes ring middleware and reitit routing functions. MS-Windows executable is provided. https://github.com/kloimhardt/bb-web#edit-with-parinfer-codemirror

babashka 18
borkdude19:10:09

Awesome work, thanks again!

👍 3
littleli21:10:33

Interesting! I would like to package it for scoop. Do you plan to have regular releases on Github?

Markus Agwin21:10:48

My intention is not to add anything in the near future to my forked Babashka repository. The bb-web repository will be updated though. What would you need for making a scoop package?

littleli21:10:16

Basically if you upload binary, output from appveyor) as zipped file as Github release, similar to what babashka is doing, it's already quite good.

littleli15:10:19

I would suggest you to maintain the versions in sync. Under v0.2.2 there should be babashka-0.2.2-windows-amd64.zip Also I'll come with the something in scoop and we can tune it to a level it's convenient.

borkdude15:10:52

@U77MR6ETD I think it would maybe be good if you renamed the executable and zip archive to something that doesn't conflict with the "official" babashka

borkdude15:10:07

like bb-web.exe and babashka-web.zip

Markus Agwin15:10:56

I‘ll take care of the naming and come back. thank you for the feedback. Any hints where to look to set the names as I need to figure out how to do that (tomorrow)

borkdude15:10:24

The name is determined in the script/compile scripts

littleli15:10:31

it would be nice to dodge also binary conflicts. Technically binary sits in it's own directory, but having bb-web.exe would be nicer as well.

borkdude15:10:58

that's what I proposed as well

littleli15:10:21

Oh, sorry I overlooked this

borkdude15:10:31

so then it must be a good idea :)

littleli15:10:42

I can dodge this by setup shim in scoop, but still valid since, also users can just download, uncompress and copy to some PATH to use it side-by side with original babashka

borkdude15:10:36

yes, let's just avoid confusion all around

Markus Agwin20:10:55

understood, will come back with a new release attempt as basis for further steps

Markus Agwin13:10:13

Made a new release with proposed naming. Pls. have a look if I missed anything.

borkdude13:10:18

@U77MR6ETD The zip has the name SNAPSHOT in it. Unpacking the zip, the binary is still called bb.exe, not bb-web.exe

Markus Agwin13:10:07

it has the name SNAPSHOT, yes. But the contained exe, I insist, has the name bb-web.exe. Are you sure on this second point?

borkdude13:10:26

$ unzip babashka-0.2.3-SNAPSHOT-windows-amd64.zip
Archive:  babashka-0.2.3-SNAPSHOT-windows-amd64.zip
  inflating: bb.exe

borkdude13:10:36

I'll try again just to make sure

Markus Agwin13:10:35

you are using babashka-0.2.3.. it is called babashka-web-0.2.3

borkdude13:10:29

Seems to work:

$ unzip babashka-web-0.2.3-SNAPSHOT-windows-amd64.zip
Archive:  babashka-web-0.2.3-SNAPSHOT-windows-amd64.zip
  inflating: bb-web.exe

borkdude13:10:54

Does it make sense to release this as bb-web <some other stable version> and not SNAPSHOT?

borkdude13:10:25

maybe just 0.2.2 same as normal bb?

borkdude13:10:34

so then people know: this is bb 0.2.2 + some extras?

Markus Agwin13:10:50

cool. Now point 1: is the name SNAPSHOT a big problem (I do not know a good way to get rid of it)

borkdude13:10:40

@U77MR6ETD These numbers are set in these files: https://github.com/kloimhardt/babashka/tree/master/resources if you change them manually, these files will reflect that. Also bb-web --version will print the correct version.

Markus Agwin13:10:34

concerting 0.2.2: I tried, but I cannot push it because git says: error: failed to push some refs to <mailto:'[email protected]|'[email protected]>:kloimhardt/bb-web.git'

borkdude13:10:46

you could choose to only override these files in CI, just temporarily overwrite them there

borkdude13:10:22

I can't help you with not being able to push to your own repos :)

borkdude13:10:59

or are you trying to push a tag?

borkdude13:10:20

you can edit / remove tags on github

Markus Agwin13:10:16

I deleted the tag 0.2.2 locally and created a new one. Deleted the tag via GitHub gui as well. Still I could not push the tag 0.2.2 . So decided to go for 0.2.3 . But I am sure this can be fixed somehow and a 0.2.2 can be made, I just did not try hard enough. So lets leave that for now, I'll look again into it.

borkdude13:10:52

Note that deleting a release is not the same as deleting a tag, you have to do both

borkdude13:10:41

I don't see the tag anymore in your repo, so I'm puzzled why you're not able to push

Markus Agwin13:10:51

I tried around a lot and just gave up somewhere in the middle, did not go all the way, that's why. Just said f* it, I go for 0.2.3

Markus Agwin13:10:26

Can fix that, give me some time. But the SNAPSHOT name is still an issue. How to remove this SNAPSHOT out of the .zip file name?

borkdude13:10:30

@U77MR6ETD I think this is derived from the files I just linked you in resources.

Markus Agwin13:10:22

understood, I just change the content of the file BABASHKA_VERSION (thought there is a more standard way somehow involving BABASHKA_RELEASED_VERSION)

borkdude13:10:08

the RELEASED_VERSION file is only used for the linux/mac installer script

Markus Agwin13:10:55

ah, I see, thank you for the info. I get back to work on a next release attempt 🙂 thank you for the patience.

borkdude13:10:23

thank YOU for your efforts

Markus Agwin13:10:09

the efforts are mostly because bb-web is for folks like me who are not well versed in dev-ops things.

Markus Agwin14:10:08

Now AppVayor obviously delays my builds because I made so many today or so... need to wait for that build.

borkdude14:10:44

@U77MR6ETD It starts a new build for every commit, so you might have to cancel those. There's a setting for automatically stopping running builds on a new commit

Markus Agwin14:10:44

Will set that. But today I wanted a build for every single commit because I juggled around with tags and release versions and names. So the penalty is well deserved 🙂

borkdude14:10:12

it only runs one build at a time

Markus Agwin14:10:02

Now its a bit clearer to me what's going on

Markus Agwin14:10:35

somehow the magic worked, voilà a new release. Pls. have a look.

borkdude14:10:15

looks good to me

Markus Agwin14:10:45

@UBLU3FQRZ can you work with the lastest Babashka-web release or is anything missing?

littleli14:10:54

@U77MR6ETD side question, what should be homepage of this project? should I use just github home?

borkdude14:10:47

good question, why is there one repo called babashka and one bb-web

borkdude15:10:03

I would change A Clojure babushka for the grey areas of Bash into something which makes it clear that this is a fork

littleli15:10:51

I agree. I let @U77MR6ETD decide what he wants there before I merge it 🙂

Markus Agwin15:10:10

bb-web is a repository with examples for beginners. Let me think about all this naming, will come back.

👍 3
borkdude15:10:06

@U77MR6ETD Idea: maintain a bb-web branch in your fork, with adapted README/examples etc.

borkdude15:10:26

so only one repo with examples and releases

borkdude15:10:51

and the master branch will be the original which can be used for merging upstream bb

Markus Agwin15:10:31

@U04V15CAJ That is the right approach from a technical point of view. But the example repository (now called bb-web) should be a small thing with just one master branch, so there is no doubt what it is.

borkdude15:10:59

then maybe call your fork repo bb-web or babashka-web and your other one bb-web-examples

Markus Agwin15:10:16

or rename the current kloimhardt/babashka into babashka-web?

Markus Agwin15:10:35

on the case. @UBLU3FQRZ will come back with a title and link to renamed git repository being the homepage.

Markus Agwin15:10:33

@UBLU3FQRZ Homepage: https://github.com/kloimhardt/babashka-web/tree/bb-web Title: A babashka fork for small web-apps

👍 3
borkdude15:10:59

@U77MR6ETD Github also allows you to set a default branch, so then you can leave out the /tree stuff

borkdude15:10:29

Note that your README says: Note: the relevant branch of this fork is guestbook2 which is a bit confusing

Markus Agwin16:10:32

cleaned all up and set default branch. So the homepage is just https://github.com/kloimhardt/babashka-web

Markus Agwin16:10:00

I need to set the title in the repository as well.

borkdude16:10:18

looking good

Markus Agwin16:10:17

Should I replace the standard Babashka Readme.md in the bb-web branch or is this confusing?

borkdude16:10:54

You could do that, while pointing to the original readme at the top

Markus Agwin16:10:27

ok, will do theses cosmetics later on. @UBLU3FQRZ Is there anything I need to do for scoop? Remember the homepage is just the GitHub page without the /tree stuff.

littleli16:10:49

I think it's in good shape now. I did some adjustments to my draft, make it a proper PR. Check here: https://github.com/littleli/scoop-clojure/pull/117/files

littleli16:10:52

I'm about to merge it. I need someone to actually test it, because I'm nowhere near my Windows box system. @U04V15CAJ 🙏 can I ask you to test it?

Markus Agwin16:10:22

I can test too

Markus Agwin17:10:32

is it ready for testing?

Markus Agwin17:10:42

@UBLU3FQRZis it necessary to do scoop bucket add java for successful scoop install bb-web ?

Markus Agwin17:10:20

just successfully installed bb-web with scoop. But I do not understand why I need to scoop bucket add java and install openjdk for it. Is this necessary or just accidental?

littleli17:10:36

It's optional. It's convenience for those who want to use scoop for both clojure (clj) and java installation

littleli17:10:54

If you side-installed java from other distribution channel, it's fine.

littleli17:10:26

for binary tools, java installation is not necessary of course.

Markus Agwin18:10:18

but still, just doing scoop install git scoop bucket add extras and scoop install bb-web did not do the trick. Something was missing, and after I did all the other (not obviously related) scoop commands described in the Readme.md, it worked.

littleli18:10:48

you mean, you installed other tools from the bucket and after that it started working?

littleli18:10:34

if it's the case I think candidate for this are: extras/vcredist2010 extras/vcredist2015

borkdude18:10:56

probably 2015, same as bb original

littleli18:10:43

there is proper depends in bb-web manifest.

Markus Agwin18:10:14

Yes, that is what I mean. I tried scoop install joker before doing scoop bucket add java and all following commands. Error message was "Couldn't find manifest for joker". Then I did bucket add 1)java+2)scoop-clojure and install 3)jdk+4)clojure, then joker and bb-web worked. One of those thing 1)-4) seem necessary, and I do not understand why.

borkdude18:10:55

You need to add scoop-clojure

borkdude18:10:04

since that's the bucket with all clojure-related things

borkdude18:10:15

where the packages are hosted from litteli

littleli18:10:56

yes, extras bucket and scoop-clojure needs to be added before issuing installation commands.

Markus Agwin18:10:26

I see. The reason I wanted to know is of course to write instruction for installing bb-web with scoop. But maybe an update of the scoop readme would be useful.

Markus Agwin18:10:59

install git is necessary as well for bb-web, right?

littleli18:10:11

I'll consider this as more and more tools are present and they maybe some useful without having even clojure installed. Which wasn't the initial purpose.

littleli18:10:39

git is necessary actually for scoop itself 🙂

littleli18:10:41

scoop uses git to update itself

Markus Agwin18:10:26

so scoop install git would not work without git being installed in the first place?

littleli18:10:55

No. I believe the reason is to be able to do scoop update scoop under the hood.

littleli18:10:19

or something similar

borkdude18:10:42

I will also use git for my package manager: https://github.com/borkdude/glam it makes sense. brew does it too

Markus Agwin18:10:24

I see. I start to understand why some government organisations still use Excel 🙂

borkdude18:10:54

for package management?

Markus Agwin18:10:52

Excel for avoiding package management at all. Unfortunately, Universities too.

borkdude18:10:54

I worked at the national tax service where they still used Office 97 because some scripts relied on that. It's best to stay away from those places.

Markus Agwin18:10:26

For sure stay away! But still we all depend on them and fund them.

littleli07:10:19

now what I usually do is to "watch releases only" on Github and once a new release is out, I run a script with version and generate a manifest for it.