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

Fix doc generation when several private libraries have the same name #369

Merged
3 commits merged into from
Dec 18, 2017

Conversation

ghost
Copy link

@ghost ghost commented Dec 17, 2017

When several private libraries have the same name, there is a clash for the generation of the documentation. The first commit adds a test exposing the issue.

To fix the issue, this PR assign unique names to all libraries as follow:

  • for external libraries, this is the findlib package name
  • for internal libraries that are public, this is the public name
  • for internal libraries that are private, this is <name>@<scope-name>

The scope name is the shortest package name in the current scope, or the empty string for the global scope.

When several private libraries have the same name, jbuilder crashes.
@ghost
Copy link
Author

ghost commented Dec 17, 2017

After, we'll need to do the same for ppx rewriters

@ghost ghost mentioned this pull request Dec 17, 2017
4 tasks
(deps ((files_recursively_in test-cases/multiple-private-libs)))
(action
(chdir test-cases/multiple-private-libs
(setenv JBUILDER ${bin:jbuilder} (run ${exe:cram.exe} run.t))))))
Copy link
Member

@rgrinberg rgrinberg Dec 17, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might need the conditional execution trick here to make travis pass on 4.02.3

EDIT: I guess we don't run the tests against all the versions in travis. Fixing make all-supported-ocaml-versions is still worthwhile however.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, I updated the test

@ghost ghost merged commit d661f74 into master Dec 18, 2017
@ghost ghost deleted the no-clash branch February 7, 2018 14:48
This pull request was closed.
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

Successfully merging this pull request may close these issues.

2 participants