Skip to content
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

Use Glide as package manager #26

Open
Xinayder opened this issue Jul 24, 2017 · 1 comment
Open

Use Glide as package manager #26

Xinayder opened this issue Jul 24, 2017 · 1 comment

Comments

@Xinayder
Copy link
Contributor

The current code imports the latest version of the required packages and it's not possible to build anymore due to some changes in Iris. We need a package manager that can fix this issue for us, by locking the packages versions. That's where Glide comes in.

However, if we are to implement Glide, we have two options available:

  • Add a workaround to the virtual env scripts, which copies the dependencies installed from vendor/ to vendor/src
  • Change our current directory structure

In case we choose the latter, a proposed directory structure by @StollD can fix the issue:

/home/user/gocode/
------- src/
----------- github.com/
--------------- KSP-SpaceDock/
------------------- SpaceDock-Backend/
----------------------- app.go
------- main.go
@StollD
Copy link
Member

StollD commented Jul 29, 2017

Since my previously proposed directory structure makes things even worse, I suggest that we drop the virtualenv script and require that the user who wants to build sdb sets his gopath accordingly. This would result in something like:

/home/user/gocode/src/github.com/KSP-SpaceDock/SpaceDock-Backend/
---- app/
---- build/
---- config/
---- emails/
---- middleware/
---- objects/
---- routes/
---- tools/
---- vendor/
---- sdb.go

My previously proposed structure would expect the vendor folder in src/github.com/KSP-SpaceDock/SpaceDock-Backend/vendor and not in the repository root, which can easily get problematic (especially with long filenames on windows).

Instead of the activate scripts in build, we would have two scripts, one for installing glide and one for preparing the build_sdb.go file. Sadly there is no way to make it easily go-installable, because that would also take care of the compiling for us.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants