add a option to see the 'bombadillo' Version #39

Closed
opened 2019-09-20 09:58:58 +00:00 by creme · 20 comments

I have just looked at bombadillo and find it very well done!
One thing I noticed is that I did not find an option to have the bombadillo version displayed.
Like: 'bombadillo -v'

I have just looked at bombadillo and find it very well done! One thing I noticed is that I did not find an option to have the bombadillo version displayed. Like: 'bombadillo -v'
Owner

THank you for checking it out and for the kind words :) That would indeed be a good addition. I have been really bad about doing any kind of proper version numbering but hope to be cleaning that up with the 2.0 release. Adding a flag for -v is a super easy addition. I will add it into the 2.0 build this morning.

If you are interested, you can try out 2.0 by pulling and building the branch v2-restructure.

It adds the following:

  • A complete code restructure with what should be a much faster screen draw
  • Better messaging
  • Ability to view where a link goes before going there (:check [linknumber])
  • Search now supports inline querying (:Search [words to search go here])
  • Preliminary support for the gemini protocol has been added, with more full support coming before the official 2.0 release
  • An slightly updated look, including a % read indicator at the bottom of the screen, new look to bookmarks panel, etc.

I'll see if I can get the -v added to both versions today actually. Should be simple enough.

THank you for checking it out and for the kind words :) That would indeed be a good addition. I have been really bad about doing any kind of proper version numbering but hope to be cleaning that up with the 2.0 release. Adding a flag for `-v` is a super easy addition. I will add it into the 2.0 build this morning. If you are interested, you can try out 2.0 by pulling and building the branch v2-restructure. It adds the following: - A complete code restructure with what should be a much faster screen draw - Better messaging - Ability to view where a link goes before going there (`:check [linknumber]`) - Search now supports inline querying (`:Search [words to search go here]`) - Preliminary support for the gemini protocol has been added, with more full support coming before the official 2.0 release - An slightly updated look, including a % read indicator at the bottom of the screen, new look to bookmarks panel, etc. I'll see if I can get the `-v` added to both versions today actually. Should be simple enough.
sloum self-assigned this 2019-09-20 15:15:13 +00:00
sloum added the
enhancement
label 2019-09-20 15:15:27 +00:00
Author

wow sloum! That sounds great =)
Many thanks for your effort.

wow sloum! That sounds great =) Many thanks for your effort.
Owner

I got the v2-restructure branch updated to include a version number as a const and the version information can now be printed via bombadillo -v. At present, bombadillo -h only shows the -v flag and no usage indicator for opening to a url, I'll add that soon (but think I want to get file saving forking in 2.0 first).

Thanks for the great suggestion! Please let me know if you end up using v2.0.0 and notice any bugs. I've been working through them as they come up (and there have been many, lol).

I'll close this issue out once I update the current main branch (v1.something).

I got the `v2-restructure` branch updated to include a version number as a const and the version information can now be printed via `bombadillo -v`. At present, `bombadillo -h` only shows the `-v` flag and no usage indicator for opening to a url, I'll add that soon (but think I want to get file saving forking in 2.0 first). Thanks for the great suggestion! Please let me know if you end up using v2.0.0 and notice any bugs. I've been working through them as they come up (and there have been _many_, lol). I'll close this issue out once I update the current main branch (`v1.something`).
Collaborator

tested this locally, works well :)

tested this locally, works well :)
Author

Hello,
i have try to test it. but no idea how it works to update bombadillo..

cd bombadillo/
git pull
git checkout v2-restructure
go install                                                                                                                                                                   
# tildegit.org/sloum/mailcap                                                                                                                                                            
../go/pkg/mod/tildegit.org/sloum/mailcap@v0.0.0-20190706214029-b787a49e9db2/mailcap.go:68:26: exitError.ExitCode undefined (type *exec.ExitError has no field or method ExitCode)

bombadillo -v

-> dial tcp: lookup -v: no such host

Hello, i have try to test it. but no idea how it works to update bombadillo.. ``` cd bombadillo/ git pull git checkout v2-restructure go install # tildegit.org/sloum/mailcap ../go/pkg/mod/tildegit.org/sloum/mailcap@v0.0.0-20190706214029-b787a49e9db2/mailcap.go:68:26: exitError.ExitCode undefined (type *exec.ExitError has no field or method ExitCode) bombadillo -v ``` -> dial tcp: lookup -v: no such host
Collaborator

Hi @creme

From that error message, it seems there is an issue building the mailcap library used by Bombadillo. This failure prevents installation of Bombadillo, and when you are running bombadillo -v at the end, it is an older version running.

I was not able to reproduce this issue on my system. I tried a new repo, which also worked correctly. These are the steps I followed:
git clone https://tildegit.org/sloum/bombadillo.git
cd bombadillo
git checkout v2-restructure
go build
./bombadillo -v

A version number was returned as expected.

What could cause this to happen? I'm not sure, but suggest reviewing the following:

  • I'm building, not installing. Could there be a difference? Try go build then ./bombadillo -v
  • Maybe there was an issue that has since been fixed? Getting the latest updates and trying again would confirm this.
  • Could the git repo have some issue? Try the steps I mention above in a new directory to create a new clone of the repo, this will help to narrow down the issue.
  • Is this some issue with Go? I'm running go1.12.5 linux/amd64, could an older version be incompatible with mailcap?

If you get the time to try some of these out, let me know how you go. If my suggestions don't help, @sloum might have some other ideas on this too.

Hi @creme From that error message, it seems there is an issue building the mailcap library used by Bombadillo. This failure prevents installation of Bombadillo, and when you are running `bombadillo -v` at the end, it is an older version running. I was not able to reproduce this issue on my system. I tried a new repo, which also worked correctly. These are the steps I followed: git clone https://tildegit.org/sloum/bombadillo.git cd bombadillo git checkout v2-restructure go build ./bombadillo -v A version number was returned as expected. What could cause this to happen? I'm not sure, but suggest reviewing the following: - I'm building, not installing. Could there be a difference? Try `go build` then `./bombadillo -v` - Maybe there was an issue that has since been fixed? Getting the latest updates and trying again would confirm this. - Could the git repo have some issue? Try the steps I mention above in a new directory to create a new clone of the repo, this will help to narrow down the issue. - Is this some issue with Go? I'm running `go1.12.5 linux/amd64`, could an older version be incompatible with mailcap? If you get the time to try some of these out, let me know how you go. If my suggestions don't help, @sloum might have some other ideas on this too.
Author

@asdf

thanks for your help! Then i use the latest go version it works ;)

12:47:35 creme@core.envs.net ~/ bombadillo -v
Bombadillo v2.0.0

very nice! Thanks

@asdf thanks for your help! Then i use the latest go version it works ;) ```bash 12:47:35 creme@core.envs.net ~/ bombadillo -v Bombadillo v2.0.0 ``` very nice! Thanks
Collaborator

@creme that's great news, glad I could help.

Are you able to say which version of go you were using before?

@creme that's great news, glad I could help. Are you able to say which version of go you were using before?
Author

i have use the default debian 10 - go version.

$ go version                                                                                                                                                                                                                                   
go version go1.11.6 linux/amd64

now i use the latest go version (installed as bin):

$ go version
go version go1.13 linux/amd64
i have use the default debian 10 - go version. ``` $ go version go version go1.11.6 linux/amd64 ``` now i use the latest go version (installed as bin): ``` $ go version go version go1.13 linux/amd64 ```
Owner

Interesting. I would have thought that 1.11 would have been fine. Maybe mailcap requires 1.12+. I wonder what build flags go supports. It might be a good idea to have the mailcap functionality be optional and be able to be selected for at build time. It is really a fairly small thing that it provides (the ability to open files from gemini in an appropriate program based on their mimetype). We could always remove it for a simpler install and just have files from non-text mimetypes download without trying to open them. Presently, a user is presented the option to save or to open (which, saves as a temp file and opens).

Interesting. I would have thought that 1.11 would have been fine. Maybe mailcap requires 1.12+. I wonder what build flags go supports. It might be a good idea to have the mailcap functionality be optional and be able to be selected for at build time. It is really a fairly small thing that it provides (the ability to open files from gemini in an appropriate program based on their mimetype). We could always remove it for a simpler install and just have files from non-text mimetypes download without trying to open them. Presently, a user is presented the option to save or to open (which, saves as a temp file and opens).
asdf added this to the 2.0.0 milestone 2019-10-27 08:24:31 +00:00
Owner

I am closing this issue now; we are getting pretty close to 2.0.0 release and this option is available on the current develop branch and will be in master in the not distant future.

Also of note is that with the mailcap dependency removed (it was just removed) go 1.11+ should be fine again (which doesn't help creme since they already upgraded, but if they reinstall or need it on a different system, stock debian go should be fine).

I am closing this issue now; we are getting pretty close to 2.0.0 release and this option is available on the current `develop` branch and will be in `master` in the not distant future. Also of note is that with the mailcap dependency removed (it was just removed) go `1.11+` should be fine again (which doesn't help creme since they already upgraded, but if they reinstall or need it on a different system, stock debian go should be fine).
sloum closed this issue 2019-10-28 04:44:29 +00:00
Author

Hello @sloum,

thanks for your great work!
I have test the develop-branch. This is really fun and looks really damn good!

Of course, I also tried the new '-v' command ;)

there is still a problem.. I test it with go version go1.13.2 linux/amd64

bombadillo -v                                                                                                                                                                                            

Bombadillo  - build
Hello @sloum, thanks for your great work! I have test the develop-branch. This is really fun and looks really damn good! Of course, I also tried the new '-v' command ;) there is still a problem.. I test it with go version go1.13.2 linux/amd64 ```bash bombadillo -v Bombadillo - build ```
Owner

Hi there. I'm not sure I understand what the problem is. Any more details you can provide would be very helpful :)

Hi there. I'm not sure I understand what the problem is. Any more details you can provide would be very helpful :)
Author

Hello, thanks for the fast reply.

i try again to desc. the problem. In the Branch "v2-restructure" works the bombadillo -v command corretly.

now i test the new "develop" Branch but i think the output of bombadillo -v is broken.

Output:

14:56:22 creme@core.envs.net ~/ bombadillo -v
Bombadillo  - build 

go version: 1.13.2

Hello, thanks for the fast reply. i try again to desc. the problem. In the Branch "v2-restructure" works the `bombadillo -v` command corretly. now i test the new "develop" Branch but i think the output of `bombadillo -v` is broken. Output: ```bash 14:56:22 creme@core.envs.net ~/ bombadillo -v Bombadillo - build ``` go version: 1.13.2
Owner

Hmmmm. Oh! Did you install via the makefile or did you use the go toolchain?

The makefile supplies the values during the build, so their absence could be caused by not using the makefile for the build.

If that is a possible situation try running the following:

# To just build in the local folder
make
./bombadillo -v

You can, of course, do a system-wide install with:

# Default location is /usr/local/bin
# This will also install the man page

sudo make install
bombadillo -v

Let me know if that solves the issue. :)

Hmmmm. Oh! Did you install via the makefile or did you use the go toolchain? The makefile supplies the values during the build, so their absence could be caused by not using the makefile for the build. If that is a possible situation try running the following: ``` # To just build in the local folder make ./bombadillo -v ``` You can, of course, do a system-wide install with: ``` # Default location is /usr/local/bin # This will also install the man page sudo make install bombadillo -v ``` Let me know if that solves the issue. :)
Author

Thanks again sloum,

the 'local'-build way works fine for me. =)

My first try was only a go install.

I try also the global build way.. this stops with the folling errors:

[ services@envs.net ]~[ /opt/services/bombadillo ]                                                                                                                                                                                 [ 17:41:24 ]
$ make
go build -ldflags "-s -X main.version=v2.0.0 -X main.build=2019-10-28T17:41+0000" -o bombadillo

[ services@envs.net ]~[ /opt/services/bombadillo ]                                                                                                                                                                                 [ 17:41:28 ]
$ sudo make install
go build -ldflags "-s -X main.version=v2.0.0 -X main.build=2019-10-28T17:41+0000" -o bombadillo
# tildegit.org/sloum/bombadillo
./client.go:780:14: undefined: strings.ReplaceAll
./client.go:848:18: undefined: strings.ReplaceAll
./client.go:860:8: undefined: strings.ReplaceAll
./url.go:53:16: undefined: os.UserHomeDir
make: *** [Makefile:20: build] Error 2
Thanks again sloum, the 'local'-build way works fine for me. =) My first try was only a `go install`. I try also the global build way.. this stops with the folling errors: ```bash [ services@envs.net ]~[ /opt/services/bombadillo ] [ 17:41:24 ] $ make go build -ldflags "-s -X main.version=v2.0.0 -X main.build=2019-10-28T17:41+0000" -o bombadillo [ services@envs.net ]~[ /opt/services/bombadillo ] [ 17:41:28 ] $ sudo make install go build -ldflags "-s -X main.version=v2.0.0 -X main.build=2019-10-28T17:41+0000" -o bombadillo # tildegit.org/sloum/bombadillo ./client.go:780:14: undefined: strings.ReplaceAll ./client.go:848:18: undefined: strings.ReplaceAll ./client.go:860:8: undefined: strings.ReplaceAll ./url.go:53:16: undefined: os.UserHomeDir make: *** [Makefile:20: build] Error 2 ```
Owner

hmmm... That is very weird. I just uninstalled, pulled develop, and ran sudo make install with no issues.

Oh! I see what is happening there. Since the build step already ran on your machine and nothing has changed in the underlying files make does not want to build again. At least that is what I think is happening.

Try this:

make clean
sudo make install

I hope that is what is happening anyway. The second time it failed on the build step and build is its own target that install calls... so it should not be doing anything different at that point. Fingers crossed running clean solves the issue.

Sorry about the trouble!

hmmm... That is very weird. I just uninstalled, pulled develop, and ran `sudo make install` with no issues. Oh! I see what is happening there. Since the build step already ran on your machine and nothing has changed in the underlying files make does not want to build again. At least that is what I think is happening. Try this: ``` make clean sudo make install ``` I hope that is what is happening anyway. The second time it failed on the build step and build is its own target that install calls... so it should not be doing anything different at that point. Fingers crossed running clean solves the issue. Sorry about the trouble!
Owner

Nevermind. This had been bugging me. I now see that the output takes issue with strings.ReplaceAll( ... ). Upon investigation, this is only available for v1.12+ of Go.

Given that, I am moving to strings.Replace( ... ) and passing -1 as the counter for it. This should retain compatibility with 1.11, which I would very much like.

Really, I'd like to know how old a go version this could build on.... :-/

I'll let you know when the update gets merged in and hopefully that solves the issue.

Nevermind. This had been bugging me. I now see that the output takes issue with `strings.ReplaceAll( ... )`. Upon investigation, this is only available for v1.12+ of Go. Given that, I am moving to `strings.Replace( ... )` and passing `-1` as the counter for it. This should retain compatibility with `1.11`, which I would very much like. Really, I'd like to know how old a go version this could build on.... :-/ I'll let you know when the update gets merged in and hopefully that solves the issue.
Author

Hello @sloum,

Thank you very much for your efforts!
If I could because I would support you. Unfortunately, I'm not learn the language "go". ;(

I have just updated and now it works:

sudo make clean
sudo make install
go build -ldflags "-s -X main.version=v2.0.0 -X main.build=2019-11-04T09:03+0000" -o bombadillo
install -d /usr/local/bin
install -m 0755 ./bombadillo /usr/local/bin/bombadillo
gzip -k ./bombadillo.1
install -d /usr/local/share/man/man1
install -m 0644 ./bombadillo.1.gz /usr/local/share/man/man1
go clean
rm -f ./bombadillo.1.gz 2> /dev/null
Hello @sloum, Thank you very much for your efforts! If I could because I would support you. Unfortunately, I'm not learn the language "go". ;( I have just updated and now it works: ```bash sudo make clean sudo make install go build -ldflags "-s -X main.version=v2.0.0 -X main.build=2019-11-04T09:03+0000" -o bombadillo install -d /usr/local/bin install -m 0755 ./bombadillo /usr/local/bin/bombadillo gzip -k ./bombadillo.1 install -d /usr/local/share/man/man1 install -m 0644 ./bombadillo.1.gz /usr/local/share/man/man1 go clean rm -f ./bombadillo.1.gz 2> /dev/null ```
Owner

Awesome news! I'm glad it is working for you now :) It seemed to be version related. I'm trying to make this compatible with as early a version as is possible. Since it uses modules that ends up being Go 1.11. So between the updates toward that, and running clean, it seems to have done the job.

Definitely be in touch and let us know if you have any other issues. We are moving toward 2.0.0 being officially released. Hopefully soon. I really appreciate your help!

Awesome news! I'm glad it is working for you now :) It seemed to be version related. I'm trying to make this compatible with as early a version as is possible. Since it uses modules that ends up being Go 1.11. So between the updates toward that, and running clean, it seems to have done the job. Definitely be in touch and let us know if you have any other issues. We are moving toward 2.0.0 being officially released. Hopefully soon. I really appreciate your help!
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: sloum/bombadillo#39
No description provided.