Giter Club home page Giter Club logo

Comments (11)

bimargulies-google avatar bimargulies-google commented on May 27, 2024 1

from inbucket.

jhillyerd avatar jhillyerd commented on May 27, 2024

No objections to doing that, I'll wait for any extra clarifications. The v3 directory would be at the top-level of the repo, right? Does this improve compatibility with blaze/bazel?

from inbucket.

bimargulies-google avatar bimargulies-google commented on May 27, 2024

Here's what the expert told me, THe expert also gave me a workaround, so I would suggest that you make the next version comply with the standard, and I'll use the workaround for now.

This repository is using a non-standard versioning scheme which causes confusing behavior when trying to import it using standard Go tooling.

See https://go.dev/ref/mod for details on how modules and versioning works.

This repository has a go.mod file (https://github.com/inbucket/inbucket/blob/main/go.mod) which gives the module name as github.com/inbucket/inbucket. The name of the module implicitly contains the major version number of the module. Since this name does not contain a version number, it is implicitly v0 or v1.

The latest tagged version of this repository is v3.1.0-beta1. When a tagged version in a repository contains go.mod file, the tag only applies to the module if the major version of the tag matches the major version of the module. In this case, the versions do not match, so the v3.1.0-beta1 tag does not apply.

For backwards compatibility with pre-modules repositories, when a tagged version in a repository does not have a go.mod file, the major versions do not need to match. If the major version is 2 or higher, the Go tooling will add a +incompatible suffix to the version.

If you look at https://pkg.go.dev/github.com/inbucket/inbucket, you will see that the "latest" version is v2.0.0+incompatible. This is because the v2.0.0 tag is for a version that contains no go.mod file. All later tags contain a go.mod with a mismatched major version, and are ignored.

from inbucket.

bimargulies-google avatar bimargulies-google commented on May 27, 2024

https://go.dev/blog/v2-go-modules#major-versions-and-module-paths seems to tell us that we need a v3 directory, in spite of my PR. WDYT?

from inbucket.

jhillyerd avatar jhillyerd commented on May 27, 2024

Not sure, this isn't something I have experience with yet. Looking at the CI failures, I think the first step is going to be to update all the internal import paths to include /v3/ -- if it still doesn't build, then likely we'd need to move things under a v3 subdir.

from inbucket.

jhillyerd avatar jhillyerd commented on May 27, 2024

Also, if you are wanting to test the build locally outside of google3, you can try make clean test build

from inbucket.

bimargulies-google avatar bimargulies-google commented on May 27, 2024

THe new directory is needed. Do you want a PR or do you want to try it?

from inbucket.

bimargulies-google avatar bimargulies-google commented on May 27, 2024

FWIW, IntelliJ is also confused by the current situation with the module versus the version.

from inbucket.

jhillyerd avatar jhillyerd commented on May 27, 2024

It's probably best I do it, since I'll want to verify the docker build and some of the development convenience scripts I use.

from inbucket.

bimargulies-google avatar bimargulies-google commented on May 27, 2024

OK, I'll leave it to you and concentrate on TLS.

from inbucket.

jhillyerd avatar jhillyerd commented on May 27, 2024

I plan to work on this v3 module stuff later this week providing there are no outstanding PRs for me to derail.

from inbucket.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.