-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
brotli.1.2.0 - via opam-publish #7599
Conversation
|
On OS X:
On Linux with OCaml 4.03:
Are you setting |
@dsheets On OS X it should be fine out the box, in theory, because I have an install script under depexts:
(The install script is needed because libbrotli isn't done by google itself but its a third party lib and none of the package managers have it yet. For Linux, I'm using this in my
|
depexts: [ | ||
[["debian"] ["clang" "libc++-dev"]] | ||
[ | ||
["linux" "osx" "source"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This set of tags is a conjunction and so will never pass (there is no environment that is both osx
and linux
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh my mistake, I will fix it now and then force push.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More pain is that depext doesn't let you test locally, you have to have it published as a package; also tried locally pinning the package.
[ | ||
["linux" "osx" "source"] | ||
[ | ||
"https://raw.githubusercontent.com/fxfactorial/ocaml-brotli/master/prepare.sh" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This URL is not versioned and we would really not like to use source
installation of depexts as they can have nasty side effects (global system changes, network retrievals, etc). Homebrew ships a library called brotli
of version 0.5.2. Is that one not sufficient?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's not a library, its an executable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's sad. I really encourage you to take a look at google/brotli#326 and related PRs/features and perhaps submit a PR to homebrew to update the brotli
package to also install headers and shared libraries. Another option is to bundle the brotli source code with your package and build and link with it which would work on OS X or Linux. Either of these options is much more preferable to having source
depexts which are generally regarded as dangerous and unfriendly to users. Finally, simply ignoring the depexts system and including a build failure message telling users they need to install brotli libraries (and where to get them) would also be fine.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dsheets yea, I know about libbrotli, I have commits on it as well. Google doesn't seem to be moving on this for quite some time.
Okay, then I'll just do a build failure message and remove the depext. I don't understand why offer a feature and then tell people not to use it...then remove it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand why offer a feature and then tell people not to use it...then remove it?
Other (e.g. private) OPAM repositories may have different policies.
[["ubuntu"] ["clang" "libc++-dev"]] | ||
] | ||
available: [ocaml-version >= "4.03.0"] | ||
messages: [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this message needed ? I think depexts are automatically advertised and suggested to be run in case of build failure.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently it doesn't matter in this case anyway, so I'll lessen it
"opam depext brotli" | ||
"Or install it yourself: https://github.com/bagder/libbrotli" | ||
] | ||
post-messages: [ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure that post-messages
is a suitable place for sample code. Sample code should go in the doc:
directory of the package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I respectfully disagree, its nice to have some quick high level idea of how to use a library, I think I've seen some npm packages do this as well (Merlin provides a similiar thing in its post-message install)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its nice to have some quick high level idea of how to use a library
I'm not saying you should not provide sample code. I'm saying that this is not the place to provide it. Here are a few reasons:
- What do I do if want to go back to that sample code later, reinstall the package ?
- This gets output on each install of the package, the user may not care about this because e.g. it is pulled through a dependency or because he already knows how to use the package. In this case this is only polluting OPAM's output with irrelevant noise.
- The best of way of providing this to the end-user in the library's API documentation, that's the natural place a programmer will look for it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay you're right, I concede.
97ff4f0
to
d0555bd
Compare
d0555bd
to
f1d42c3
Compare
Thanks! |
Bindings to Google's Brotli compresion algorithm
OCaml Bindings to brotli, Google's compression algorithm for the web
Source: https://github.com/google/brotli/ RFC:
http://www.ietf.org/id/draft-alakuijala-brotli
Pull-request generated by opam-publish v0.3.2