gno icon indicating copy to clipboard operation
gno copied to clipboard

[RFC][WIP] feat: implement versioning

Open harry-hov opened this issue 1 year ago • 2 comments

This is rough and partial implementation of the proposal that I mentioned here

(NOTE: Marked this as "ready for review" for discussion and early feedback)

Changes/Status

  • [x] gno.mod is mandatory to publish pkg/realm(s)
  • [x] gno.mod's module directive takes version now e.g:
    module gno.land/p/{handle}/foo v1.2.3
    
  • [x] pkg/realm(s) are versioned (IOW, multiple version of pkgs/realms can exist with same import path)
  • [x] gnokey maketx addpkg command takes pkg path and version from gno.mod file
  • [x] gnokey maketx call command takes -pkgPath in the format gno.land/p/{handle}/[email protected]
  • [ ] disable previous version of realm when someone publishes new version
  • [ ] realm state migration

Testing

to test, run (versioning.txtar):

$ cd gno.land/cmd/gnoland
$ go test -v . -run TestTestdata/versioning
Contributors' checklist...
  • [ ] Added new tests, or not needed, or not feasible
  • [ ] Provided an example (e.g. screenshot) to aid review or the PR is self-explanatory
  • [ ] Updated the official documentation or not needed
  • [ ] No breaking changes were made, or a BREAKING CHANGE: xxx message was included in the description
  • [ ] Added references to related issues and PRs
  • [ ] Provided any useful hints for running manual tests
  • [ ] Added new benchmarks to generated graphs, if any. More info here.

harry-hov avatar Feb 05 '24 15:02 harry-hov

@harry-hov

Can you please resolve the merge conflicts in this PR? 🙏

zivkovicmilos avatar Feb 12 '24 10:02 zivkovicmilos

My main concern is visualizing its daily use. @leohhhn, can you collaborate with @harry-hov on creating a high-level tutorial draft (quick and high-level is probably enough) to clarify its functionality? Including one or two compelling examples would be great.

moul avatar Mar 11 '24 16:03 moul

Codecov Report

Attention: Patch coverage is 0% with 12 lines in your changes are missing coverage. Please review.

Project coverage is 44.35%. Comparing base (5c5d9ef) to head (7279190). Report is 201 commits behind head on master.

Files Patch % Lines
tm2/pkg/std/memfile.go 0.00% 11 Missing :warning:
tm2/pkg/amino/binary_decode.go 0.00% 1 Missing :warning:
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1631      +/-   ##
==========================================
- Coverage   47.49%   44.35%   -3.14%     
==========================================
  Files         388      433      +45     
  Lines       61311    65287    +3976     
==========================================
- Hits        29117    28956     -161     
- Misses      29756    33931    +4175     
+ Partials     2438     2400      -38     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar Mar 19 '24 20:03 codecov[bot]

If we want to keep following semver, we have to change the first module release to v0.1.0:

https://semver.org/spec/v2.0.0.html#how-should-i-deal-with-revisions-in-the-0yz-initial-development-phase

I agree. changed it to v0.1.0 🙌

Thanks @ajnavarro

harry-hov avatar Mar 26 '24 06:03 harry-hov

Initially, I envisioned this PR to serve as a proof of concept for versioning. I marked it as ready for review to draw attention to this topic and to receive feedback on the idea in general.

As directed by @zivkovicmilos, I am converting this to a draft until I complete the implementation.

harry-hov avatar Apr 08 '24 08:04 harry-hov

@harry-hov is this a breaking change? Trying to determine whether we can do this feature post test4 launch.

Kouteki avatar Apr 11 '24 11:04 Kouteki

@harry-hov is this a breaking change? Trying to determine whether we can do this feature post test4 launch.

@Kouteki Yes it's a breaking change. It changes how you publish and interact with gno packages.

I have no problem with moving this post launch. Regardless, it's on my priority list.

harry-hov avatar Apr 16 '24 13:04 harry-hov

Closing this PR; improved proposals are welcome.

thehowl avatar Jun 18 '24 12:06 thehowl