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

"Private" helper library Util name clashing #1

Closed
soren-n opened this issue May 12, 2021 · 1 comment
Closed

"Private" helper library Util name clashing #1

soren-n opened this issue May 12, 2021 · 1 comment

Comments

@soren-n
Copy link
Owner

soren-n commented May 12, 2021

Apparently the package stanza does not result in private libraries being actually private.
This is because the name is not mangled to become unique and tied to the project, and so will name clash with other libraries with the same name in the global context.

But it looks like this behaviour is on its way:
ocaml/dune#3864

To patch this for now; I'll mangle the name Util manually to Typeset_util.
I'll leave this issue open until the dune issue is resolved; then I'll de-mangle Typeset_util back to Util.

The reason for me insisting on the separation; Having the helper sources and library sources separate in a project structure, makes the project easier to maintain; since it is easier to understand when there is a practical separation of concerns.

Also to avoid code duplication; in this project both lib, test and example depend on util.

@soren-n
Copy link
Owner Author

soren-n commented Nov 23, 2021

Move Util out into its own package since it was using copies of it for other projects; github.com/soren-n

@soren-n soren-n closed this as completed Nov 23, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant