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

ocamldep: add -plugin and use compilerlibs to build #1015

Merged
merged 3 commits into from Mar 2, 2017

Conversation

Projects
None yet
5 participants
@lefessan
Contributor

lefessan commented Jan 18, 2017

This PR simply adds the option -plugin PLUGIN to ocamldep, as it might be useful to extend ocamldep with the same plugins as ocamlc.

It also bootstraps the compiler (in a separate commit), so that ocamlc can also use the new ability for plugins to define arguments.

@lefessan lefessan closed this Jan 19, 2017

@lefessan lefessan reopened this Jan 19, 2017

@lefessan lefessan closed this Jan 19, 2017

@lefessan lefessan reopened this Jan 19, 2017

@dra27

This comment has been minimized.

Show comment
Hide comment
@dra27

dra27 Jan 19, 2017

Contributor

Possibly applying Holmes deduction - it's much easier to restart CI tests by signing into Travis (with your GitHub ID - the initial auth is very quick) and restarting the specific run!

Contributor

dra27 commented Jan 19, 2017

Possibly applying Holmes deduction - it's much easier to restart CI tests by signing into Travis (with your GitHub ID - the initial auth is very quick) and restarting the specific run!

@lefessan

This comment has been minimized.

Show comment
Hide comment
@lefessan

lefessan Jan 19, 2017

Contributor

The problem here is not Travis, but Appveyor, and I don't see any "restart build" button on Appveyor...

Contributor

lefessan commented Jan 19, 2017

The problem here is not Travis, but Appveyor, and I don't see any "restart build" button on Appveyor...

@dra27

This comment has been minimized.

Show comment
Hide comment
@dra27

dra27 Jan 19, 2017

Contributor

AppVeyor seems to be clogged up - I don't know why

Contributor

dra27 commented Jan 19, 2017

AppVeyor seems to be clogged up - I don't know why

@lefessan

This comment has been minimized.

Show comment
Hide comment
@lefessan

lefessan Feb 26, 2017

Contributor

Rebased, no bootstrap anymore. I think the lack of -plugin in ocamldep is a bug and should be fixed for 4.05.0 .

Contributor

lefessan commented Feb 26, 2017

Rebased, no bootstrap anymore. I think the lack of -plugin in ocamldep is a bug and should be fixed for 4.05.0 .

@Octachron

This comment has been minimized.

Show comment
Hide comment
@Octachron

Octachron Feb 26, 2017

Contributor

Would it be possible to add an entry to ocamldep man page and manual description? Since plugins can modify dependencies, I concur with you that the lack of plugin support for ocamldep is a bug.

Contributor

Octachron commented Feb 26, 2017

Would it be possible to add an entry to ocamldep man page and manual description? Since plugins can modify dependencies, I concur with you that the lack of plugin support for ocamldep is a bug.

@shindere

This comment has been minimized.

Show comment
Hide comment
@shindere

shindere Feb 26, 2017

Contributor
Contributor

shindere commented Feb 26, 2017

@lefessan

This comment has been minimized.

Show comment
Hide comment
@lefessan

lefessan Feb 27, 2017

Contributor

What would the -plugin option do, actually?

@shindere It does the same as for ocamlc/ocamlopt, i.e. load a .cmxs/.cma into the tool, to extend its capability. It can do the same as ppx, but also work on the typedtree or add optimizations, if the hooks are available.

Contributor

lefessan commented Feb 27, 2017

What would the -plugin option do, actually?

@shindere It does the same as for ocamlc/ocamlopt, i.e. load a .cmxs/.cma into the tool, to extend its capability. It can do the same as ppx, but also work on the typedtree or add optimizations, if the hooks are available.

@shindere

This comment has been minimized.

Show comment
Hide comment
@shindere

shindere Feb 27, 2017

Contributor
Contributor

shindere commented Feb 27, 2017

@lefessan

This comment has been minimized.

Show comment
Hide comment
@lefessan

lefessan Feb 27, 2017

Contributor

There were already some hooks in the compiler and I added other ones, for example a plugin can add a hook to map on the Typedtree (for example, Pierrick's ocp-typechecker could re-check the types from a plugin). Plugins that work on the Parsetree can be shared with ocamldep. But I am sure to see how plugins could be used in ocamllex. ocamlcp and ocamloptp are supposed to follow arguments to ocamlc/ocamlopt, so they should support it already. I don't know for ocamlmklib.

Contributor

lefessan commented Feb 27, 2017

There were already some hooks in the compiler and I added other ones, for example a plugin can add a hook to map on the Typedtree (for example, Pierrick's ocp-typechecker could re-check the types from a plugin). Plugins that work on the Parsetree can be shared with ocamldep. But I am sure to see how plugins could be used in ocamllex. ocamlcp and ocamloptp are supposed to follow arguments to ocamlc/ocamlopt, so they should support it already. I don't know for ocamlmklib.

@damiendoligez

This comment has been minimized.

Show comment
Hide comment
@damiendoligez

damiendoligez Mar 2, 2017

Member

Reviewed. OK for trunk and 4.05 when the manual is updated.

Member

damiendoligez commented Mar 2, 2017

Reviewed. OK for trunk and 4.05 when the manual is updated.

@lefessan lefessan merged commit b7b0a64 into ocaml:trunk Mar 2, 2017

0 of 2 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details

@lefessan lefessan deleted the lefessan:2017-01-18-ocamldep-plugin branch Mar 2, 2017

lefessan added a commit that referenced this pull request Mar 2, 2017

ocamldep: add -plugin and use compilerlibs to build (#1015)
* ocamldep: add -plugin argument, and use compilerlibs to build
@lefessan

This comment has been minimized.

Show comment
Hide comment
@lefessan

lefessan Mar 2, 2017

Contributor

Manual updated, PR squashed-merged in trunk, commit cherry-picked to 4.05.

Contributor

lefessan commented Mar 2, 2017

Manual updated, PR squashed-merged in trunk, commit cherry-picked to 4.05.

camlspotter pushed a commit to camlspotter/ocaml that referenced this pull request Oct 17, 2017

ocamldep: add -plugin and use compilerlibs to build (#1015)
* ocamldep: add -plugin argument, and use compilerlibs to build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment