-
Notifications
You must be signed in to change notification settings - Fork 17
Rewrite to use jbuilder, ocaml-migrate-parsetree and topkg #7
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
Conversation
|
Thanks for this. I've had a quick look at the patch. The change to relative filenames is backwards-incompatible, isn't it, surely? Should we provide [%blob] and [%blob-relative]? Do we need to check everyone who uses ppx_blob (at least in OPAM) won't be affected? As for the whole patch, I'd like to separate out ocaml-migrate-parsetree (which is obviously a good thing) from the other changes. What are the new dependencies to build? Is topkg required to build, or just for making a new OPAM package? Something as simple as ppx_blob can't really have any dependencies, other than ppx_tools and similar, so I don't think requiring jbuilder to build it is a good idea. jbuilder is very new, too. Something else may be fashionable next year. Summary:
|
|
Thanks for the quick reply!
Yes, the change is backwards compatible to my knowledge.
|
|
Note that omp depends on jbuilder already and jbuilder also drops the dependency on ocamlfind. |
|
Thanks @rginberg. Looks like I need to catch up on recent developments. @andreas how would you feel about taking over ppx_blob? I wrote in an afternoon, just as an example of how ppx works, and after your patch is applied I won't understand most of it... I would be happy to assign it to you... |
ppx_blob.ml
Outdated
| str (get_blob loc filename) | ||
| | _ -> | ||
| raise (Location.Error ( | ||
| Location.error ~loc "[%ppx_blob] accepts a string, e.g. [%ppx_blob \"file.dat\"]")) |
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.
The extension node is [%blob], so I think that this errror message should be updated accordingly.
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.
True, thanks!
|
Sorry I never followed up on this -- I ended up using |
|
Hi! Thanks for taking care of this. I noticed that depending on the list of preprocessors, this can fail. Example: let a = [%blob "a.txt"]
let b = [%blob "b.txt"]
let () = Printf.printf "%S %S\n%!" a bThe above works, but replacing On the other hand, this works with |
|
@andreas Thanks for the offer. I can't transfer the repository to you yet, since you have an identically-named one (the fork). Can you rename it, so I can initiate the transfer? |
|
@johnwhitington done |
|
Now it says "andreas already has a repository in the johnwhitington/ppx_blob network". Shall we wait until this pull request is finished and merged, and then transfer it? |
|
Another options is to to add Andreas as a collaborator or administrator to
your own repo. It would keep the url situation simpler for users and
theres no reason why a package can't have more than 1 owner.
Anyway its just a suggestion. Do as you wish with your own software of
course :)
…On Wed, Aug 16, 2017, 7:57 PM John Whitington ***@***.***> wrote:
Now it says "andreas already has a repository in the
johnwhitington/ppx_blob network".
Shall we wait until this pull request is finished and merged, and then
transfer it?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#7 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAIe-wHyefKSXHSIoOUMHSPCNguFKbSDks5sYssigaJpZM4Olx2w>
.
|
|
Thanks @rgrinberg. Done. |
|
@rgrinberg, good suggestion -- @johnwhitington thanks for adding me. @emillon As far as I can tell, this is due to |
7a2b7cd to
91f166c
Compare
|
OK, thanks. I guess I'll have to report that to |
|
@andreas @johnwhitington what's the status of this PR? I see some users that would benefit from this transition ocaml/dune#285 (comment) |
91f166c to
85930f9
Compare
|
I've rebased on master now and included the |
|
No objection here; thanks for the work. |
85930f9 to
ca34dfe
Compare
Hi @johnwhitington :)
I wanted to use
ppx_blobwithocaml-graphql-server, but I was blocked by the fact thatppx_blobis not compatible withocaml-migrate-parsetree. As such I began to rewrite the library to useocaml-migrate-parsetree, and along the way switched tojbuilderandtopkg. Functionally the library is almost the same, except it now looks for the included file relative to the file being compiled (jbuildercopies source files into a_builddirectory, so this is required). I also added a single test case withalcotest.I would be happy to see this merged, but I know it's also some significant changes. Let me know what you think.
Thanks!