Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: support marking pkg as Draft #790

Merged
merged 3 commits into from
May 4, 2023

Conversation

harry-hov
Copy link
Contributor

Description

See (#763 (comment))

@harry-hov Thanks for the clarification, indeed I missed that part where the gnoland binary pushes all that list of packages. I understand well the usage now. A better name than deprecated would be good (like experimental ?), but since it's already supported by golang.org/x/mod let's go with that 🙏 .

@tbruyelle we can still change the name to something better. What about something self-explaining like draft (hugo), unpublishable, restricted or private (NPM).


Suggested candidates:

  • WIP (work-in-progress)
  • Experimental
  • Draft (hugo)
  • Unpublishable
  • Restricted
  • Private (NPM)

PS: Open for better names.

cc: @tbruyelle @moul

@harry-hov harry-hov requested a review from moul April 30, 2023 15:04
@harry-hov harry-hov requested a review from a team as a code owner April 30, 2023 15:04
@harry-hov harry-hov self-assigned this Apr 30, 2023
@harry-hov harry-hov changed the title feat: support marking pkg as WIP [RFC] feat: support marking pkg as WIP Apr 30, 2023
@moul
Copy link
Member

moul commented Apr 30, 2023

I believe that "private" is the most appropriate option because it indicates a desire to not share the content publicly, regardless of whether it's in progress or finished.

My second preferred choice would be "draft," as it conveys a similar meaning commonly used in publication systems such as blogs.

Btw, what about replacing deprecated with the choice instead of keeping both?

@harry-hov
Copy link
Contributor Author

I would prefer draft or experimental. Can we have some kind of voting for that?

@harry-hov
Copy link
Contributor Author

Btw, what about replacing deprecated with the choice instead of keeping both?

Um. I'm not sure what's right. Since we already have deprecated field in *modfile.Module, there is no harm in parsing it. Makes it more compatible with go.mod.

Or we can use custom GnoModule instead of *modfile.Module (I won't recommend this)

// Parsed gno.mod file.
type File struct {
-	Module  *modfile.Module
+       Module  GnoModule
	Go      *modfile.Go
	Require []*modfile.Require
	Replace []*modfile.Replace

	Syntax *modfile.FileSyntax
}

+type GnoModule struct {
+	Mod        module.Version
+	Draft      bool
+	Syntax     *Line
+}

PS: I'm fine with both. replacing/keeping deprecated.

@harry-hov harry-hov changed the title [RFC] feat: support marking pkg as WIP [RFC] feat: support marking pkg as Draft May 3, 2023
@harry-hov harry-hov changed the title [RFC] feat: support marking pkg as Draft feat: support marking pkg as Draft May 3, 2023
@harry-hov
Copy link
Contributor Author

For now replaced WIP -> Draft

@moul
Copy link
Member

moul commented May 3, 2023

Um. I'm not sure what's right. Since we already have deprecated field in *modfile.Module, there is no harm in parsing it. Makes it more compatible with go.mod.

I wasn't aware of this. Let's keep both then.

@ajnavarro ajnavarro merged commit 653241a into gnolang:master May 4, 2023
peter7891 pushed a commit that referenced this pull request May 9, 2023
moul-bot pushed a commit that referenced this pull request May 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants