-
Notifications
You must be signed in to change notification settings - Fork 208
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Golang #2162
base: master
Are you sure you want to change the base?
Add Golang #2162
Conversation
I'm personally not a fan of random scripts uploaded to github for multiple reasons also, I don't think this meets our app elegibility rubric as this is a programming language/compiler and doesn't really have any GUI functionality #185 I'll keep this open for feedback but if it were to be included, we would need to make an exception to the elegibility rubric or change it. |
In regards to security. I linked the script to the current commit to prevent changes to the script having an effect until the install script is manually updated
I considered this. However, the rubric specifies the following:
Since Pi-Apps has a category for programming, and many individuals utilize Raspberry Pis for programming, I think it could make life easier for individuals who wish to program in Go, or use |
We do also have other command-line utilities like GitHub CLI, which many mainly GUI-oriented users aren’t likely to use. |
In addition, there are other development focused apps available on Pi-Apps, so I think Go has a place in Pi-Apps. |
The precedent has not been set for compilers to be included in pi-apps. Everything in the programming category is an IDE and similar tooling. We would need a precident set that we would like CLI only code compilers to be included in the programming category. I personally think that any developers looking to write and compile go code already know the resources for how to follow a two step process to install their tooling from google https://go.dev/doc/install same goes for rust https://www.rust-lang.org/learn/get-started |
Okay, makes sense |
Of course the version in the debian repos is outdated, why not just skip the middle man here? https://go.dev/dl/ https://go.dev/doc/install This way it can be updated easier and doesn't depend on any script + checksums can be used since they are supplied. |
That's a fair point. However, to install Go, you also need to set up your PATH manually. |
@slashtechno I do not like the idea of a script running within another script, which is what is going on here. If I were you, I would adapt canha's script into a simpler and shorter one. |
@ryanfortner How do you suggest shortening it? |
Maybe just simply splitting |
@ryanfortner Okay, will do |
I am willing to help out if you need assistance. Just ping me if so. |
@ryanfortner Is this better? I attempted to get rid of functions which won't be used in the script |
@@ -0,0 +1,4 @@ | |||
(github.com/.../...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is this line?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To signify that the following lines are Github links in the form of username/repo
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not just add them as links directly then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In my opinion, it looks cleaner this way.
@theofficialgman Attempted to resolve the issues in commit cf6e56e |
this script really won't function in pi-apps pi-apps scripts are always exclusivly run in bash, no matter what the users default shell program is (this is for compatibility reasons). the script checks the currently running shell, which will always return bash in pi-apps also the uninstall script still has MacOS crap in it. |
How can this be alleviated? |
actually nevermind, it looks like SHELL is a special varaible containing the default login shell. so if the user changes their default shell, it will be correctly interpreted even if the script is currently running in bash. uninstall script still needs those macos removal edits though |
I think you need to actually go through and read and understand the scripts. There are quite a few things broken in the uninstall due to missing variables being set from you removing too much. |
Apologies, should be fixed now. I should have noticed the missing variable declaration earlier. |
apps/golang/install
Outdated
@@ -0,0 +1,90 @@ | |||
#!/bin/bash | |||
VERSION="1.19.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you change this and the references to lowercase version
then our updater will be able to update it at some point as well as our metadata parser will be able to find the app version
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also stable version is now 1.19.3, which is why an updater within pi-apps would be necessary
for personal reference, this will get the current version to add to a pi-apps auto updater script
curl -s https://go.dev/dl/?mode=json | jq -r '.[0].version'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I made VERSION
lowercase, and removed VERSION="1.19.2"
Is that all that was needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, version=1.19.3
need to exist there... you weren't supposed to remove it, just change from uppercase to lowercase
apps/golang/install
Outdated
@@ -1,5 +1,4 @@ | |||
#!/bin/bash | |||
VERSION="1.19.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
uhh.. you removed it outright
I suggest reading the create an app wiki page: https://github.com/Botspot/pi-apps/wiki/Creating-an-app |
I would rather have go installed systemwide instead of only for the current user follow official go instructions https://go.dev/doc/install create a custom profile.d script to set the path variable to include the system go installation. I suggest naming it ubuntu/debian package it slightly differently, avoiding setting the GOPATH and simply creating symlinks from to be honest there is so much wrong with this installation method that I will probably just rewrite it myself and add you as a co-contributor to the commit message. @Botspot can you confirm if you would even like this (go/golang) in pi-apps (see here and the following messages #2162 (comment) ) |
1d137bb
to
6119ae6
Compare
Utilizes canha/golang-tools-install-script