Skip to content

How to support more than one API version? #73

@tomas-mraz

Description

@tomas-mraz

Hi Max and Randall,
I would like to open the topic "maintain two major versions" to discuss. I mean for Vulkan 1.1 and 1.3.
I dig around versioning schema a little bit.
The tricky part is the heavy focus of Go on a module's major versions like v1 ... v2 ... v3 ... so the difference between 1.1 and 1.3 simply isn't enough. (I tried and end up with "has malformed module path")

1/ We can do the branch v1 for Vulkan 1.1 with tags v1.0.0+ and
make master for Vulkan 1.3 with tags v3.0.0+.
Import ...vulkan-go/vulkan get data by tags from "v1" branche.
Import ...vulkan-go/vulkan/v3 get data by tags from master (as "v3" in case "v4" come).

2/ The second approach is to just add the directory "v3" in the existing module in the master branch. Make there a second go.mod with path ...vulkan-go/vulkan/v3.
So import ...vulkan-go/vulkan is the same and import ...vulkan-go/vulkan/v3 actually means "path with folder v3".
It is a little bit messy because all files are together and tags should be v1.0.0+ and v3.0.0+ in the same branch depending on changes to publics. It is a backward-compatible solution (in case some app can't handle branches).

These two solutions can't make "visible version" sync "module 1.3 -> Vulkan 1.3" (for example Vulkan 2.0 could be module v4)
As long as I understand there are no publication changes without a tag (even "latest" just detects only the latest tag).
So it looks like no more riding on the last commit :-)

3/ The alternative is "GOPATH mode" which seems like "no tags, all in one repo, just longer path in git and module's name" ... good old days.

Interesting sources ...
https://go.dev/blog/v2-go-modules
https://github.com/golang/go/wiki/Modules#releasing-modules-v2-or-higher

My personal preferences are, 1 the best ... 3 I can live with that ... 2 ohh noo
I can't rule out that I didn't miss something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions