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

make dep-map work with non-vendored deps #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Stebalien
Copy link
Collaborator

For some reason, it was expecting dependencies to be vendored in vendor/.

For some reason, it was expecting dependencies to be vendored in `vendor/`.
@@ -108,13 +108,14 @@ var DepMapCommand = cli.Command{
Name: "dep-map",
Usage: "prints out a json dep map for usage by 'import --map'",
Action: func(c *cli.Context) error {
pkg, err := LoadPackageFile(gx.PkgFileName)
var pkg gx.Package
Copy link
Owner

Choose a reason for hiding this comment

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

any particular reason to do this? The base gx.Package type doesnt have the platform specific code in it

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hm. I believe I thought I needed it to call ForEachDep but that's clearly not the case.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Ah. Yes, it is because I wanted to use ForEachDep.

  1. I don't actually use the additional fields.
  2. I need buildMap to take a gx.Package because that's what ForEachDep spits out.

Copy link
Owner

Choose a reason for hiding this comment

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

If you make buildmap take a gx.PackageBase, then the gx-go Package type can be passed into it just fine.

Either way though, as long as you arent writing out package.json files, or needing the gx fields, it doesnt matter much

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If you make buildmap take a gx.PackageBase, then the gx-go Package type can be passed into it just fine.

Yeah, I'd just rather be consistent. Note: I do need a gx field dvcsImport but I extract that with GxDvcsImport.

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.

2 participants