[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 5/5] gitignore: Ignore golang package directory




> On May 26, 2020, at 5:59 PM, Ian Jackson <ian.jackson@xxxxxxxxxx> wrote:
> 
> George Dunlap writes ("Re: [PATCH 5/5] gitignore: Ignore golang package 
> directory"):
>> [explanation]
> 
> Sounds quite tangled...
> 
>> Nick, any opinions?
> ...
>>> Is there not a risk that humans will try to edit it ?
> 
> Anyway ISTM that you have definitely considered this so
> 
> Acked-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
> 
> assuming that and Nick convince yourselves you've addressed this
> possible issue.
> 
>> I suppose someone might.  If we decide we want to support older versions of 
>> go, we probably want to figure something out there.  Options:
>> 
>> 1. Copy the files to a temp directory instead.  This is complicated because 
>> we have to find a good temp directory, and we’d have to copy them every 
>> time, slowing down the incremental build (though not that much).
> 
> I don't think that helps much.
> 
>> 2. Put a file in the generated directory like “GENERATED_DO_NOT_EDIT”.
>> 
>> 3. Put them in tools/golang/GENERATED_DO_NOT_EDIT/src instead.
> 
> Do they not have a header comment saying DO NOT EDIT ?

The generated files do, but this copies all the files, including the 
non-generated ones.

Anyway, it turns out is has nothing to do with go modules per se, but more to 
do with my quixotic attempt to make it possible to build from stuff installed 
locally in $PREFIX, rather than having to clone something over the internet.  
The current version of the “build test” doesn’t actually use this GOPATH stuff, 
and works even on versions of golang that don’t have module support.

I’ve got a patch that removes this whole fake-GOPATH thing; I’ll send that 
along in lieu of patches 4 and 5.

Thanks,
 -George

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.