Re: [go-nuts] Re: Go += Package Versioning

2018-02-24 Thread Sam Whited
On Sat, Feb 24, 2018, at 21:44, Sean Russell wrote: > I'm working on adding support for Bitbucket, per your comment in #23950 > . I'm struggling a bit with > executing the tests in x/vgo -- should I expect vgo test to work? I feel > like I'm missing

[go-nuts] Re: Go += Package Versioning

2018-02-24 Thread Maxim Ivanov
I am replying mostly to https://resea rch.swtch.com/vgo-import article. It is proposed that "moauth" author should do double work, even if his code works absolutely fine with either verion of oauth. This viral effect will be causing chain reaction and a lot of people will be creating

[go-nuts] Re: Go += Package Versioning

2018-02-24 Thread Spencer Nelson
I'd like to better understand how multiple-module repositories work if tagged commits are used for minor and patch versioning. My understanding is that major version increments are controlled with import paths, while minor and patch version increments are controlled with commit tags. Is it

Re: [go-nuts] Go += Package Versioning

2018-02-24 Thread ivanov . maxim
The proposed rules around semver and minimal version selection address > every pain point I've had so far, by aligning available authority with the > responsibility of the library authors: tell me what versions definitely > will *not* work, and I'll take it from there. > > Maybe I miss

[go-nuts] Re: Go += Package Versioning

2018-02-24 Thread Sean Russell
Russ, I'm working on adding support for Bitbucket, per your comment in #23950 . I'm struggling a bit with executing the tests in x/vgo -- should I expect vgo test to work? I feel like I'm missing something obvious. I added unit tests first and

[go-nuts] Re: Go += Package Versioning

2018-02-24 Thread bits128
Hi Russ, I had a question about this: > We expect that most developers will prefer to follow the usual “major branch” convention, in which different major versions live in different branches. In this case, the root directory in a v2 branch would have a go.mod indicating v2, like this: It

Re: [go-nuts] Appreciating Go

2018-02-24 Thread Bakul Shah
r := os.Open(filename) if isError(r) { return r.(error) } f := r.(*os.File) // or better: var f *os.File; f = r Error checking being a common pattern, isError() can be added as a builtin or trivially in errors pkg. Likely the enclosing function also returns an error so the return in the second

Re: [go-nuts] Appreciating Go

2018-02-24 Thread roger peppe
> I once counted there were about 8000 uses of ,error as > return types for functions in $GOROOT/src which could benefit > from sum types. I'm not entirely convinced that sum types are a net win as a substitute for (T, error) return values. Where currently we have: f, err :=

Re: [go-nuts] Re: Experience report on coming to Go from a C perspective

2018-02-24 Thread Egon
Few additional possible solutions: 1. use something similar to https://github.com/awalterschulze/goderive create appropriate func. 2. some IDE / tool should be able to figure these refactorings out... or at least find the places that need to be changed. Changing a field or method name is quite

[go-nuts] Re: vgo with package path without dot

2018-02-24 Thread flicaflow
I'm not saying it shouldn't work as you try to do it. I thing vgo is a very early prototype many corner cases seem to be unsolved. Your problem arises because the old mechanism (GOPATH) is not there anymore. I actually think that your replace workaround should work, so maybe you should file an

[go-nuts] Re: Go Programming Language Course

2018-02-24 Thread bnixon67
As an alternate to Linux VMs, is it possible to install the Windows Subsystem on the Windows 10 lab machines? What IDE, if any, do you plan to use and how complex are the programs? Do you need to worry about C integration,

[go-nuts] Re: vgo with package path without dot

2018-02-24 Thread wilk
On 24-02-2018, flicaf...@gmail.com wrote: > --=_Part_9366_348433021.1519468400573 > Content-Type: multipart/alternative; > boundary="=_Part_9367_868487623.1519468400573" > > --=_Part_9367_868487623.1519468400573 > Content-Type: text/plain; charset="UTF-8" > > Vgo implements a

[go-nuts] Re: math integer sizes

2018-02-24 Thread Stefan Nilsson
I don't know why it's not part of the standard library, but here is a piece of code that does the job. (It's written in a slightly roundabout way to make sure that the constants are untyped.) const BitsPerWord = 32 << (^uint(0) >> 63) // either 32 or 64 const ( MaxInt =

[go-nuts] Re: vgo with package path without dot

2018-02-24 Thread wilk
On 24-02-2018, Amnon Baron Cohen wrote: > --=_Part_9094_478136164.1519461749739 > Content-Type: multipart/alternative; > boundary="=_Part_9095_482511421.1519461749739" > > --=_Part_9095_482511421.1519461749739 > Content-Type: text/plain; charset="UTF-8" > > > > On Friday, 23

[go-nuts] Re: vgo with package path without dot

2018-02-24 Thread flicaflow
Vgo implements a package manager which is suppose to download dependencies from some remote host. It determines where to fetch the code by looking at the import path of the dependency. Hence All dependencies which are managed with the new vgo mechanism musst follow this import path convention.

[go-nuts] Re: vgo with package path without dot

2018-02-24 Thread Amnon Baron Cohen
On Friday, 23 February 2018 > > > I work with GOPATH per project. > > Then I use to give them a one word path directly under src: > > $GOPATH/src/myapp > > Go is a highly opinionated language assumes that you lay out your code as described in https://golang.org/doc/code.html If you decide