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

META: gg.top should depend on gg #1

Closed
whitequark opened this issue Jul 11, 2014 · 5 comments
Closed

META: gg.top should depend on gg #1

whitequark opened this issue Jul 11, 2014 · 5 comments

Comments

@whitequark
Copy link

Subject says it. I don't think there is a reason to require gg.top but not gg, and adding a dependency means one #require less.

@dbuenzli
Copy link
Owner

You've got things the wrong way around, see this line. Just #require "gg" (sorry for the unbound values in the released version):

# #require "gg";;
/Users/dbuenzli/.opam/4.01.0/lib/ocaml/unix.cma: loaded
/Users/dbuenzli/.opam/4.01.0/lib/ocaml/bigarray.cma: loaded
/Users/dbuenzli/.opam/4.01.0/lib/gg: added to search path
/Users/dbuenzli/.opam/4.01.0/lib/gg/gg.cma: loaded
/Users/dbuenzli/.opam/4.01.0/lib/gg/gg_top.cma: loaded
Unbound value Raster.pp_buffer.
Unbound value Raster.pp_sample_format.

@whitequark
Copy link
Author

Oops. Sorry for the noise.

@dbuenzli
Copy link
Owner

@whitequark Actually I think that what you assumed maybe the right thing to do. The problem with my current toplevel scheme, is that I don't give the choice to people. If they #require "gg", the damn thing will open Gg and that may be annoying for some reason (e.g. name clashes).

So I think it would be better if #require "gg" wouldn't do anything and require "gg.top" would depend on gg and do the open Gg and install the printers. So that you are actually given the choice.

What do you think ?

@dbuenzli dbuenzli reopened this Aug 23, 2014
@whitequark
Copy link
Author

@dbuenzli I think the scheme you propose is much more clear for the users. I certainly like it more; a package shouldn't behave differently when loaded in toplevel and when not.

@dbuenzli
Copy link
Owner

@whitequark Yes. I'm going to gradually change that in my distributed packages.

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

2 participants