Go tool for major version upgrades

Overview

GOMAJOR

$ gomajor help

GoMajor is a tool for major version upgrades

Usage:

    gomajor <command> [arguments]

The commands are:

    get     upgrade to a major version
    list    list available updates
    path    modify the module path
    help    show this help text

List Updates

$ gomajor list
github.com/go-redis/redis: v6.15.9+incompatible [latest v8.1.3]

Update and Rewrite Imports

$ gomajor get github.com/go-redis/[email protected]
go get github.com/go-redis/redis/[email protected]
foo.go:4:2 github.com/go-redis/redis/v8
bar.go:5:2 github.com/go-redis/redis/v8

Increment Module Path Version

$ gomajor path -next
module github.com/go-redis/redis/v9
bench_test.go:11:2 github.com/go-redis/redis/v9
cluster.go:15:2 github.com/go-redis/redis/v9/internal
cluster.go:16:2 github.com/go-redis/redis/v9/internal/hashtag
# etc ...

Change Module Path

$ gomajor path goredis.io
module goredis.io
bench_test.go:11:2 goredis.io
cluster.go:15:2 goredis.io/internal
cluster.go:16:2 goredis.io/internal/hashtag
# etc ...

Features:

  • Finds latest version.
  • Rewrites your import paths.
  • Lets you ignore SIV on the command line.
  • Update your module's major version.

Warning:

  • By default, only cached content will be fetched from the module proxy (See -cached flag).
  • If you have multiple major versions imported, ALL of them will be rewritten.
  • The latest version will not be found if there are gaps between major version numbers.
Issues
  • Add move command for moving packages

    Add move command for moving packages

    Add a move command for moving packages in a module.

    $ gomajor move pkg/foo internal/bar
    

    Behaviour:

    • Move the directory
    • Change the package declaration.
    • Rewrite import paths.
    opened by icholy 2
  • Add -alias flag to auto-add replace directive

    Add -alias flag to auto-add replace directive

    Nice tool.

    I was thinking .. as you’ve seen discussion at 44550, I need to try it, but a replace of a SIV to one without may help bandaid the experience I’m suggesting in that proposal. What if this tool had -alias which you could pass a package name without SIV and it would add replace to alias. Then could add -alias-all to alias every module without passing a specific one.. and maybe -alias-skip too for exclusion.

    I usually use Makefiles, so something like that could be used to manage an experience similar to what I’m describing in 44550. What do you think?

    Cc @zikaeroh

    opened by pkieltyka 2
  • coreos/go-systemd: not finding latest version

    coreos/go-systemd: not finding latest version

    I've added a failing test for the go-systemd module. If I go to the proxy URL directly, it gives me a blank page:

    https://proxy.golang.org/github.com/coreos/go-systemd/@v/list

    bug 
    opened by icholy 2
  • Nested Modules

    Nested Modules

    Here's an example of a nested module: https://github.com/go-redis/redis/blob/master/extra/rediscmd/go.mod

    module github.com/go-redis/redis/extra/rediscmd
    
    go 1.15
    
    require (
    	github.com/go-redis/redis/v8 v8.4.4
    	github.com/onsi/ginkgo v1.15.0
    	github.com/onsi/gomega v1.10.5
    )
    

    If I run gomajor next -path at the root of the go-redis/redis it will rewrite imports to github.com/go-redis/redis/extra/rediscmd to github.com/go-redis/redis/v9/extra/rediscmd.

    opened by icholy 1
  • Support replaced modules

    Support replaced modules

    The kubernonsense go.mod uses replace to pin their dependencies. This bad technique has leaked into repositories which extend kubernetes. I think we can support this use-case with the following 2 behaviours.

    1. Don't skip replaced modules in gomajor list
    2. If a required module is replaced with the exact same version, gomajor get will update both the required and and replaced version.
    opened by icholy 1
  • russross/blackfriday: not finding latest version

    russross/blackfriday: not finding latest version

    $ gomajor get github.com/russross/[email protected]
    go get github.com/russross/[email protected]+incompatible
    

    The latest version is: github.com/russross/blackfriday/[email protected]. Since the latest +incompatible version is v2 it checks for a github.com/russross/blackfriday/v3 import path which doesn't exist.

    opened by icholy 0
  • Add command for changing the current module path

    Add command for changing the current module path

    I've seen some people using the get sub-command to rewrite imports when incrementing their module's major version. There should be a dedicated command for that use-case. This command will update go.mod and rewrite all imports in the module.

    Examples:

    // increment the major version
    gomajor path -next
    
    // specify the version to use the path
    gomajor path -version v5
    
    // specify the whole path to use
    gomajor path "github.com/icholy/gomajor/v10"
    
    opened by icholy 0
  • gomajor get github.com/go-redis/redis/v8 gets wrong version

    gomajor get github.com/go-redis/redis/v8 gets wrong version

    I ran the following:

    gomajor get github.com/go-redis/redis/v8
    go get github.com/go-redis/redis
    go: github.com/go-redis/redis upgrade => v6.15.9+incompatible
    bridge/adapters/sources/redis.go: github.com/go-redis/redis/v8 -> github.com/go-redis/redis
    bridge/adapters/targets/redis.go: github.com/go-redis/redis/v8 -> github.com/go-redis/redis
    

    Instead of getting the latest version of v8, it downloaded v6.15.9+incompatible

    bug 
    opened by icholy 0
  • Feat: add apidiff subcommand

    Feat: add apidiff subcommand

    The apidiff subcommand will be a more ergonomic interface to the x/exp/apidiff package.

    Show the apidiff between two import paths

    gomajor apidiff github.com/deckarep/[email protected]  github.com/deckarep/[email protected]
    
    • ~~this works outside of a module.~~
    • if only one path is provided, the other is inferred from your go.mod.
    opened by icholy 0
Owner
Ilia Choly
Ilia Choly
Go dependency management tool experiment (deprecated)

Dep dep is a dependency management tool for Go. It requires Go 1.9 or newer to compile. NOTE: Dep was an official experiment to implement a package ma

Go 13k Jun 24, 2022
dependency tool for go

Godep - Archived Please use dep or another tool instead. The rest of this readme is preserved for those that may still need its contents. godep helps

null 5.6k Jun 22, 2022
Go Package Manager (gopm) is a package manager and build tool for Go.

?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? ?? In favor of Go Modules Proxy since Go 1.11, this pr

Go Package Manager 2.5k Jun 16, 2022
Spaghetti: a dependency analysis tool for Go packages

Spaghetti is an interactive web-based tool to help you understand the dependencies of a Go program, and to explore and evaluate various possible efforts to eliminate dependencies.

Alan Donovan 708 Jun 23, 2022
A major platform Remote Access Terminal Tool based by Blockchain/P2P.

NGLite A major platform Remote Access Terminal Tool based by Blockchain/P2P. No public IP address required.More anonymity Example Detection Warning!!!

null 258 Jun 26, 2022
Bump-version - Bump a given semantic version, following a given version fragment

bump-version Bump a given semantic version, following a given version fragment.

Weslei Juan Novaes Pereira 3 Feb 7, 2022
Hackathon project with intent to help based on heuristics for aks cluster upgrades.

AKS-Upgrade-Doctor AKS Upgrade Doctor is a client side, self-help diagnostic tool designed to identify and detect possible issues that cause upgrade o

null 1 May 25, 2022
API that upgrades connection to use websocket. Contains server and client and testing how they communicate

Websocket Test API How to execute First run server using: make run-server. Then run many client instances with: make run-client. Then start typing in

null 0 Dec 25, 2021
Set of scripts & tools for converting between numbers and major system encoded words.

major-system-converter Set of scripts & tools for converting between numbers and major system encoded words. Uses phonetics instead of letters to conv

null 3 Feb 12, 2022
A tool to determine the highest version number that's smaller than a target version number

semver-highest A tool to determine the highest version number that's smaller than a target version number. Installation go install github.com/marten-s

Marten Seemann 1 Oct 13, 2021
Go version manager. Super simple tool to install and manage Go versions. Install go without root. Gobrew doesn't require shell rehash.

gobrew Go version manager Install or update With curl $ curl -sLk https://git.io/gobrew | sh - or with go $ go get -u github.com/kevincobain2000/gobre

Pulkit Kathuria 102 Jun 7, 2022
A tool to restart a Docker container with a newer version of the image

repull A tool to restart a Docker container with a newer version of an image used by the container Often you may need to pull a newer version of an im

Eugene 23 May 14, 2022
🎉 An awesome version control tool for protoc and its related plugins.

❤️ PowerProto is actively maintained! Any questions in use can be directly raised issue, I will respond to you as fast as possible. If you think the p

storyicon 153 Jun 21, 2022
dots is CLI tool to build, version and publish config file bundles.

dots-cli dots is CLI tool to build, version and publish config file bundles. TODO (shared): Writing comprehensive documentation Designing landing page

Alvan Rahimli 11 Jun 26, 2022
A little database tool for version control

A little database tool for version control It's very like sqitch, because I imitate it. If it's not allowed, give me a message, I'll destroy this proj

null 6 Nov 2, 2021
A dead simple CLI tool that prints the next semantic version based on the last tag of your git repository

nextver A dead simple CLI tool that prints the next semantic version based on the last tag of your git repository. Install go install github.com/junk1

Tom 3 Jun 4, 2022
Web-based, zero-config, dependency-free database schema change and version control tool for teams

Live Demo • Install • Help • Development • Design Doc Bytebase is a web-based, zero-config, dependency-free database schema change and version control

Bytebase 3k Jun 23, 2022
TheOtherRolesInstaller - A simple tool to install the latest version of TheOtherRoles Mod

TheOtherRoles Installer This is a simple tool to install TheOtherRoles Mod for A

Oliver Stahl 1 Feb 14, 2022
Kdmq - Tool to query KDM data for a given Rancher version

kdmq (kdm query) Tool to query KDM data for a given Rancher version, think of: W

Sebastiaan van Steenis 5 Feb 1, 2022
gomUP is a tool to keep track of outdated dependencies and upgrade them to the latest version

gomUP ?? gomUP is a tool to keep track of outdated dependencies and upgrade them to the latest version. Designed for monorepo Go projects and Go proje

Alihan Doğuş Yalçın 19 Mar 16, 2022
🛹 A version management tool for kusion

Introduction ?? kusionup is a version management tool for kusion. It is heavily inspired by goup. ??️ Language English | 简体中文 ✨ Functional Overview su

KusionStack 3 May 30, 2022
Go Version Manager

gvm By Josh Bussdieker (jbuss, jaja, jbussdieker) while working at Moovweb Currently lovingly maintained by Benjamin Knigge Pull requests and other an

Moovweb 7.4k Jun 25, 2022
A node.js version management utility for Windows. Ironically written in Go.

The npm/Microsoft/Google recommended Node.js version manager for Windows. This is not the same thing as nvm. The original nvm is a completely separate

Corey Butler 21.8k Jun 29, 2022
The pure golang implementation of nanomsg (version 1, frozen)

mangos NOTE: This is the legacy version of mangos (v1). Users are encouraged to use mangos v2 instead if possible. No further development is taking pl

nanomsg 1.5k Jun 22, 2022
libsvm go version

libsvm golang version libsvm golang version derived work based on LIBSVM 3.14. Info this lib based on LIBSVM java version, just translate java to go.

Xianjie 71 Jan 23, 2022
A Go interface to ZeroMQ version 4

A Go interface to ZeroMQ version 4. Warning Starting with Go 1.14, on Unix-like systems, you will get a lot of interrupted signal calls. See the top o

Peter Kleiweg 1k Jun 22, 2022
This is a Golang wrapper for working with TMDb API. It aims to support version 3.

This is a Golang wrapper for working with TMDb API. It aims to support version 3. An API Key is required. To register for one, head over to themoviedb

Cyro Dubeux 52 Jun 10, 2022
"go build" wrapper to add version info to Golang applications

govvv The simple Go binary versioning tool that wraps the go build command. Stop worrying about -ldflags and go get github.com/ahmetb/govvv now. Build

Ahmet Alp Balkan 525 Jun 22, 2022