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

Setting that allows to specify sub directories as part of the same module #19902

Open
2 tasks
ttytm opened this issue Nov 16, 2023 · 0 comments
Open
2 tasks
Labels
Feature/Enhancement Request This issue is made to request a feature or an enhancement to an existing one.

Comments

@ttytm
Copy link
Member

ttytm commented Nov 16, 2023

Describe the feature

The FR is about adding the possibility that files in subdirectories can belong to one module.
It ties in with an announcement in conversation on discord some months ago: https://discord.com/channels/592103645835821068/592294828432424960/1096096129990533181

Use Case

  • Visibility control, to create clear user APIs. I want an east way to keep private parts private. Having to set things to public that are intended for library internal usage just for the reason of organising files into directories feels like a better solution should be integrated.
  • Falling back on a flat directory structure with prefixes can be a go-to solution - but this looks like a freaking Visual Basic project. Organization would become simpler and cleaner if things that belong to one module can still be organized into a subdir.

Proposed Solution

When Alex mentioned the integration would involve a setting in the v.mod file. I think the solution would look something like allowing to specify subdirectories that belong to a module in the v.mod file of that module. Then adding a check might not be too complicated that the module of the files in the subdir matches with that setting.

Other Information

The feature didn't receive attention since it was mentioned on discord. Back then I thought this is one of my personal most wanted features. It would make V better than Go in more aspects.

Putting it on the Roadmap would be a great first step.

Acknowledgements

  • I may be able to implement this feature request
  • This feature might incur a breaking change

Version used

0.4.3

Environment details (OS name and version, etc.)

any

Note

You can use the 👍 reaction to increase the issue's priority for developers.

Please note that only the 👍 reaction to the issue itself counts as a vote.
Other reactions and those to comments will not be taken into account.

@ttytm ttytm added the Feature/Enhancement Request This issue is made to request a feature or an enhancement to an existing one. label Nov 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature/Enhancement Request This issue is made to request a feature or an enhancement to an existing one.
Projects
None yet
Development

No branches or pull requests

1 participant