dpw/vendetta

Bitbucket sub-package: XML Syntax error

blang opened this issue · 2 comments

blang commented

Example code:

package main

import "fmt"
import "bitbucket.org/zombiezen/gopdf/pdf"

func main() {
    u := pdf.Unit(1.2)
    fmt.Println("Test:", u)
}

Try running vendatta:

parsing bitbucket.org/zombiezen/gopdf/pdf: XML syntax error on line 9: expected attribute name in element

If you import a bitbucket sub-package for example bitbucket.org/zombiezen/gopdf/pdf the corresponding url https://bitbucket.org/zombiezen/gopdf/pdf returns a 404, since the import path needs special treatment and it should only fetch the parent.

blang commented

Well bitbucket does not provide a git interface, therefore that obviously can not work... Duh..
Maybe it should print a proper error message stating there is not git repository to fetch.

dpw commented

Yes, it's because vendetta does not have the special-case support for bitbucket.org that 'go get' has.

(Some projects on bitbucket.org are git repos, and 'go get' uses the bitbucket.org API to find out the repo type so it can use the correct command. The ideal thing for vendetta to do would be to use the API too, so it can proceed if the project uses git. But no-one has complained that vendetta does not support git repos on bitbucket yet, so I'll wait until they do.)

I've added a better error message for projects on bitbucket.