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

Make the module.workspace=off as default #10553

Closed
bep opened this issue Dec 19, 2022 · 2 comments
Closed

Make the module.workspace=off as default #10553

bep opened this issue Dec 19, 2022 · 2 comments

Comments

@bep
Copy link
Member

bep commented Dec 19, 2022

See golang/go#51967

I suspect not many Hugo users use this feature, but if they do, I think the default behaviour is confusing. Having a go.work file in the project used for development purposes and add that to your .gitignore file would make for a great dev setup, but it would be a pain to have to remember turning it off.

Setting module.workspace=off would enable the best of both worlds:

  • Default would work great for development.
  • Any other use cases could be configured.
@UtkarshVerma
Copy link

This would be a considerable improvement upon current state where module.workspace only accepts the absolute path.

Maybe having the following logic for the config would make sense?

  1. off by default
  2. on would tell Hugo to look for go.work in the project
  3. <absolute or relative path> would tell Hugo to use the workspace file at that path.

I can't think of any use case for the third case right now, so it could probably be dropped.

bep added a commit to bep/hugo that referenced this issue Dec 19, 2022
Also, resolve any workspace file relative to the workingDir.

Fixes gohugoio#10553
@bep bep closed this as completed in 0d4b17d Dec 19, 2022
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants