Skip to content

Fix wrong commands path on Makefile #257

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

Merged
merged 1 commit into from
May 8, 2018

Conversation

ajnavarro
Copy link
Contributor

Signed-off-by: Antonio Jesus Navarro Perez [email protected]

@bzz
Copy link
Contributor

bzz commented May 3, 2018

Tried locally, make packages produces the executable binaries now 🎉

Seems a bit confusing due to https://github.com/src-d/guide/blob/master/engineering/conventions-go.md#executables

As this was not arch-specific issue, to avoid future 🐛 like this, do you think it might be worth to also include an "integration test" CI profile, that tried to launch binary after make packages and just reports the exit code?

@erizocosmico
Copy link
Contributor

Shouldn't we instead change the folder name to cmd as the engineering guide says?

@ajnavarro ajnavarro force-pushed the fix/makefile-cmd-to-cli-path branch 4 times, most recently from 2855338 to 01005db Compare May 3, 2018 11:40
@@ -3,7 +3,7 @@ package main
import (
"os"

"github.com/src-d/gitbase/cli/gitbase/cmd"
"github.com/src-d/gitbase/cmd/gitbase/cmd"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe we should move the contents of the cmd folder into the gitbase folder. It does not make much sense to have them in a folder and the path looks weird

@ajnavarro ajnavarro force-pushed the fix/makefile-cmd-to-cli-path branch from 01005db to d6abd51 Compare May 3, 2018 13:37
@ajnavarro
Copy link
Contributor Author

@erizocosmico done.

@@ -1,4 +1,4 @@
package cmd
package main
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why? Subcommnads are supposed to be implemented in a subpackage.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do they need to be in a subpackage?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mcuadros What was the rationale to separate subcommands on a different package? Allowing imports?

Copy link
Contributor

@mcuadros mcuadros May 7, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing. The commands should be tested, usually we don't test main packages, but the logic of the commands should be tested, so having the command in a separate package, leaves more clear that should be testested, also is cleaner.

Additionally allow more complex patterns, as is used in other projects were several commands are sharing the same commands.

@mcuadros
Copy link
Contributor

mcuadros commented May 7, 2018

Who this PR should the problem of the build?

@ajnavarro
Copy link
Contributor Author

@mcuadros Packfile had a wrong path pointing to the commands folder.

@mcuadros
Copy link
Contributor

mcuadros commented May 7, 2018

But this PR is not changing the Makefile

@ajnavarro
Copy link
Contributor Author

That was the first approach, but we decide to do it correctly and change instead the folder to the correct one due to the company guidelines: cli to cmd.

@mcuadros
Copy link
Contributor

mcuadros commented May 7, 2018

But this PR is removing the package for the commands.

Signed-off-by: Antonio Jesus Navarro Perez <[email protected]>
@ajnavarro ajnavarro force-pushed the fix/makefile-cmd-to-cli-path branch from d6abd51 to c0a3abb Compare May 7, 2018 10:58
@ajnavarro
Copy link
Contributor Author

Moved all commands to cmd/gitbase/command package after an offline talk with @mcuadros.

@ajnavarro ajnavarro mentioned this pull request May 8, 2018
@ajnavarro
Copy link
Contributor Author

Merging to fix the build. If we want to add more changes to the path, we can do it into another PR.

@ajnavarro ajnavarro merged commit ee3bf19 into src-d:master May 8, 2018
@ajnavarro ajnavarro deleted the fix/makefile-cmd-to-cli-path branch May 8, 2018 08:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants