KSP-SpaceDock / SpaceDock-Backend

Old-Experimantal-Backend (not finished, please ignore)
Other
5 stars 6 forks source link

Use Glide as package manager #26

Open Xinayder opened 7 years ago

Xinayder commented 7 years ago

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:

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 commented 7 years ago

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.