Re: [go-nuts] go modules and local packages

2020-08-08 Thread Sankar P
> Then why are they in a monorepo? > > AFAIK monorepos for strictly controlled dependenies and easier refactorings. > > If two part needs different versions for something common, then they should > live and evolve separately. This is a subset of a larger mono-repo. This repo has sources for abou

[go-nuts] [proposal] Make go compiler work with different syntax versions in same project to support adaptivity

2020-08-08 Thread ivanivanyuk1993
Add support of optional syntax_version to file beginning, allow compiler to tokenize/compile file by the compiler of syntax_version, using any number of syntax_version-s in same project Why? Because go takes ridiculously long to implement generics, and implementation is very likely to not be pe

[go-nuts] "eg tool" for modules

2020-08-08 Thread Kaveh Shahbazian
The "eg" tool - from Go Tools Repo/Module - does not support Go Modules. 1 - Is there an alternative example-based refactoring tool, that provides the same functionality? 2 - Are there any plans to support Go Modules by "eg" tool? P.S. The *astutil*

Re: [go-nuts] [generics] type inference on an interface function param

2020-08-08 Thread dolanor
Thanks for your input. Clearly it's not the best example, but it surprised me. With your explanation, I get it. And also, reading my code again, it is confusing. I always thought that Go could benefit from generics, but clearly, I want to also avoid template meta programming, because it is clearl

Re: [go-nuts] go modules and local packages

2020-08-08 Thread Gulácsi Tamás
Then why are they in a monorepo? AFAIK monorepos for strictly controlled dependenies and easier refactorings. If two part needs different versions for something common, then they should live and evolve separately. From: Sankar P Sent: Saturday, August 8, 2020 9

Re: [go-nuts] go modules and local packages

2020-08-08 Thread Sankar P
> Use one go.mod pee repo. That won't be possible. It is a monolithic repo. svc1 and svc2 may need two different versions of a common dependency. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving e

Re: [go-nuts] go modules and local packages

2020-08-08 Thread Sankar P
> You could try moving mylib to your $GOPATH/src/, and > import "mylib" > in the services. I tried that but could not get `go run cmd/svc1.go` from trying to checkout a non-existent url (for the `mylib`). Can you share the contents of the `go.mod` file for svc1 and mylib ? -- You received th

Re: [go-nuts] go modules and local packages

2020-08-08 Thread Sahas Subramanian
You could try moving mylib to your $GOPATH/src/, and import "mylib" in the services. On Sat, 8 Aug 2020, 20:21 Sankar, wrote: > Hi > > I have a monolithic source repository that is NOT in git, mercurial etc. > > The directory structure is: > > root > | > |--- mylib > | | --- mylib.go

[go-nuts] go modules and local packages

2020-08-08 Thread Tamás Gulácsi
Use one go.mod pee repo. -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https

[go-nuts] go modules and local packages

2020-08-08 Thread Sankar
Hi I have a monolithic source repository that is NOT in git, mercurial etc. The directory structure is: root | |--- mylib | | --- mylib.go | | --- go.mod |--- svc1 | | --- go.mod | | --- cmd | | svc1.go |--- svc2 | | --- go.mod | | ---

Re: [go-nuts] "Interfaces" with type lists are a strange beast

2020-08-08 Thread Robert Engels
Understood. Even if you keep operators they could be mapped to certain built in interface methods. C++ has operator loading, Java does not (except for auto-boxing) It seems Go generics are trying to play in the middle and I think the end result is going to lead to confusing code, but we shall s

Re: [go-nuts] "Interfaces" with type lists are a strange beast

2020-08-08 Thread Ian Lance Taylor
On Fri, Aug 7, 2020 at 6:54 PM Robert Engels wrote: > > I’d really like to see an example of generic code that takes both string and > numeric types that uses operators. Sorting/searching is one but as I already > said the built in string operators are not sufficient for collation cases. > > Eve

[go-nuts] go mod why with specific version

2020-08-08 Thread Vasiliy Tolstov
Hi! Does go support some magic variant of go mod why but with a specific version? I have some app with multiple external deps and i don't know why some deps required with version from some commit in master branch and not released tag. I'm trying to do go mod vendor and grep whole go.mod files for v

Re: [go-nuts] Generics and parentheses

2020-08-08 Thread Denis Cheremisov
> Have the authors considered the implications of requiring the `type` keyword to use a generic type, not just at declaration time? Would this open up more syntax possibilities, such as `var x T`? This might be easier to read at the expense of five more characters of typing. It also could unify

Re: [go-nuts] Re: Generics: after type lists

2020-08-08 Thread 'Axel Wagner' via golang-nuts
On Sat, Aug 8, 2020 at 5:58 AM 'Carla Pfaff' via golang-nuts < golang-nuts@googlegroups.com> wrote: > On Saturday, 8 August 2020 at 01:33:59 UTC+2 Patrick Smith wrote: > >> if we think it likely that a future version of Go will allow operator >> overloading >> > > That's highly unlikely: https://g