Comments (2)
If they're in the same root and at compatible versions (that is, if the code within that submodule hasn't changed since the requested version), I'd say leave them in the same repository (and just update replace
directives appropriately).
If they're in the same root at incompatible versions, maybe emit an error?
from gohack.
If they're in the same root and at compatible versions (that is, if the code within that submodule hasn't changed since the requested version), I'd say leave them in the same repository (and just update replace directives appropriately).
If they're in the same root at incompatible versions, maybe emit an error?
I'm not entirely sure whether that's a good idea. The error situation you describe will be increasingly likely the larger a program is. It would be frustrating to want to add a printf somewhere in a large program only to be told that it can't be done because of a version clash.
Note that this issue also applies when you've got multiple major versions of a repository. I think it's reasonable to want to hack on both example.com/m
and example.com/m/v2
at the same time, but the current approach wouldn't allow that.
I'm currently thinking of checking out all modules to $GOHACK/module/_mod instead of just $GOHACK/module. That way this issue goes away because it's perfectly OK to have example.com/m/_mod
and examples.com/m/v2/_mod
.
The down side is that you might well want to use the same directory for both. There's always go mod edit --replace
for that, I suppose.
from gohack.
Related Issues (20)
- getting permission denied error HOT 3
- implement undo -rm
- gohack get -vcs failed with incompatible pathspec HOT 1
- gohack does not allow relative directories in GOHACK env var. HOT 2
- Ran gohack get github.com/user/somerepo and it is missing the .git directory HOT 1
- bitbucket.org issues
- cannot undo if directory has been removed
- README: perhaps briefly explain how to work with a fork, including pushing a change to the fork?
- Use existing dependency code source from the GOPATH HOT 4
- Idea: flag for "fork" remote HOT 2
- proposal: add command to determine if commit is ancestor of module version
- add 'gohack promote' or 'gohack undo -get' HOT 2
- add 'gohack list' or shell completion support HOT 4
- accept package path in 'gohack get' HOT 2
- gohack redo
- gohack undo leaves trailing newlines HOT 3
- cannot get module info HOT 4
- Imply module name from $PWD HOT 5
- support linked file in gohack directory HOT 1
- supporting workspaces? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gohack.