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

Remove go generate from v2 build process #1801

Open
2 of 3 tasks
abitrolly opened this issue Jul 23, 2023 · 5 comments
Open
2 of 3 tasks

Remove go generate from v2 build process #1801

abitrolly opened this issue Jul 23, 2023 · 5 comments
Labels
area/v2 relates to / is being considered for v2 kind/bug describes or fixes a bug

Comments

@abitrolly
Copy link
Contributor

My urfave/cli version is

v2

Checklist

  • Are you running the latest v2 release? The list of releases is here.
  • Did you check the manual for your release? The v2 manual is here
  • Did you perform a search about this problem? Here's the GitHub guide about searching.

Dependency Management

  • My project is using go modules.
  • My project is using vendoring.
  • My project is automatically downloading the latest version.
  • I am unsure of what my dependency management setup is.

Describe the bug

The generation step when calling make from https://cli.urfave.org/CONTRIBUTING/#development-workflow takes way too much detours.

Observed behavior

graph LR
make --> build.go --> gogen[go generate] --> cli.go --> urfave-cli-genflags/make --> urfave-cli-genflags --> goimports
Loading

Expected behavior

At least this.

graph LR
make --> build.go --> urfave-cli-genflags/make --> urfave-cli-genflags --> goimports
Loading

Additional context

Did I miss anything?

Want to fix this yourself?

Yup. If there is no some hidden magic behind.

@abitrolly abitrolly added kind/bug describes or fixes a bug area/v2 relates to / is being considered for v2 status/triage maintainers still need to look into this labels Jul 23, 2023
@dearchap
Copy link
Contributor

@abitrolly Do you really want to optimize this since we are moving forward with v3 ? Does the analysis apply to v3 ?

@abitrolly
Copy link
Contributor Author

@dearchap yes. That will make v2 maintenance easier. In case somebody needs to build it with modifications for debug.

@abitrolly
Copy link
Contributor Author

v3 doesn't seem the be affected.

@meatballhat meatballhat removed the status/triage maintainers still need to look into this label Apr 27, 2024
@bartekpacia bartekpacia changed the title De-generate v2 build process Remove go generate from v2 build process May 2, 2024
@dolmen
Copy link
Contributor

dolmen commented May 31, 2024

Instead the build process should depend on go generate and not on make because that's the idiomatic way. See discussion in #1802 for opinions.

@abitrolly
Copy link
Contributor Author

@dolmen "if all you have is a hammer, everything looks like a nail".

I need a reference that calling make from Go code is the idiomatic Go. As shown by #1802 (comment) it is make calling Go, then Go calling make to call an app. Much more maintainable it to have make call the app.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/v2 relates to / is being considered for v2 kind/bug describes or fixes a bug
Projects
None yet
Development

No branches or pull requests

4 participants