-
Notifications
You must be signed in to change notification settings - Fork 1
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
design considerations for a new go-clang/clang repository #1
Comments
First of all, I would like to invite @marxriedl to join the group, since he helped out with part of the code. |
Right now I can only answer a few issues with certainty:
EDIT: I will carry on with refactoring the go-clang-phoenix repository. Hopefully finishing the last API generation problems today. |
agreed. as for |
(PS: I made you (@zimmski) "owner" of go-clang. apologies for the oversight) |
Thanks. I had little time over the last two weeks but I just now finished a big part of this little project. Clang 3.7 is working, tested and I made a branch for it https://github.com/zimmski/go-clang-phoenix/tree/v3.7 I did the same for 3.6 but 3.5 and 3.3 are not working yet because some packages need to be whiteflagged. I already made some TravisCI issues to whiteflag them. One problem with gopkg.in that just came up is that we cannot use "dotted" versioning e.g. 3.5 needs to be "v35" not "v3.5". The problem is that if there are two branches called v3.5 and v3.6 gopkg.in can only access 3.6 since the selector does only work on major versions. Hope that is fine with you? Concerning the import path: If a developer needs an "older" version of this binding and not the newest the developer needs to use the gopkg.in path. I do not see any other way? I do not think that the old go-clang repository is needed for bootstrapping since the current phoenix/bootstrap branch shows that it already works for that purpose (AFAIK). The "go-clang-generate" code does not need to be included in every branch but I see no harm in including it unless we want *really clean branches (?). It could then just rest in the bootstrap branch so that the master and the version branches are simply just bindings. The current generation code handles some 3.6 and 3.7 quirks which do not interfere with the 3.3,3.4 and 3.5 generation. So right now we can handle all versions in one code base. So it would be currently possible that the version and the master branches just hold the bindings + headers. What do you think? Remaining TODO:
I think that covers everything, @sbinet what do you think? Anything to add? |
@sbinet: Everything except the move to the go-clang group, the announcement and the handling of the handling of the old go-clang repository is done now :-) Looking forward to your feedback! |
Now, for the review, I would propose to initialize an empty repository
|
|
wrt concerning the review, there are tools to migrate issues from one repository to another: https://github-issue-mover.appspot.com/ (source over there: https://github.com/google/github-issue-mover) (I tested it for one of my projects. it worked) or https://github.com/IQAndreas/github-issues-import wrt the repo layout, I agree it is somewhat cleaner, naming-wise, but I fear this would seriously hinder detective work and code archeology. |
I fear I have to be a little disappointing with this comment ;-) pkg-config would be neat because it really makes cgo projects go-getable but I searched and I cannot find a .pc file for clang anywhere. Adding a .pc file to every clang installation, especially older ones, is not possible for us, so we cannot rely on it. Maybe we can ask for it in the next Clang version and then make its go-clang version go-getable? Sorry, I do not think that it is worth migrating the issues. I would simple transfer the ownership of the phoenix project to the go-clang group. That is just filling out one form. Also the history and the blame-information is then still intact. So I would rather make the repository as good as possible in the current location, then transfer it and change all mentions of "go-clang-phoenix" to just "go-clang". |
The suggested repo layout would make the detective work easier since the user can just say "I am using version xyz of go-clang". I do not see any problems besides that. We are a heavy user of go-clang and besides lacking support for newer Clang versions we did not have any problems that were on the side of go-clang. The import path meta tag does not allow the mentioning of branch names. At least I did not see it mentioned in the documentation. So we would need to have different repositories/folders anyway. If you are concerned about the import name being "v37" or "latest" we could just state in the README that users should use an explicit import name of e.g. |
yes, wrt wrt repo layout. do we agree on something along the lines of:
(you're right about tags and branches for one thing though: when ok. I'll stop my bikeshedding here and start diving into |
Just a warning. The phoenix project still needs a lot of refactoring (especially headerfile.go) and there are still some |
ack :) |
I add an issue for
|
(the unless you already have an idea of how many other applications would use the (minor bikeshedding: I would call the wrt wrt |
I am btw happy with discussing all this. This should be a solid rewrite. So I like to write down all concerns and tackle them one by one until we agree on solutions. |
Time for me to take part in this conversation. Regarding the tree proposed by @sbinet and @zimmski's issue with it: |
(only tangentially related: I plan to attend FOSDEM-2016 and also submit a |
It is fine with me if you want to present the rewrite :-) I do not know yet if I can make it to this year's FOSDEM though. Regarding the review: I have some additional time left for open source project for November (especially this Friday will be open). December on the other hand is pretty well booked because of private events. Are you reviewing the API bindings and the generation command separately? We could push the bindings first since they live in separated repositories than the generate command and they are not influenced by internal refactoring. |
I was somewhat focusing on the generation command. |
I want to do the following today:
I can do that in the go-clang group or in my namespace and then just move the repositories. Anyway, the version repositories should then just hold the bindings so we can move them right away or after a review. |
ack. |
@sbinet: We finished the documentation and the release process:
If you agree with |
@go-clang/dev OK. let's do that. |
So we move |
yes. (unless you disagree?) |
Fine with me! I will move them ASAP and change the content and imports. Looking really forward to finalizing the rewrite :-) |
The version repositories are now online and the CI is fine with them:
When go-clang/gen#73 is resolved I will also add versions for 3.3 and 3.5. I have it on my TODO to test it on an internal project which is a heavy user of go-clang. @sbinet do you know of any projects that are using go-clang so that we can test them? I put the announcement in #5. So I think we can now close this issue? |
the known (to godoc at least) importers of ie: I've created #6. Let's close this. |
Sparked by sbinet/go-clang#15, it might be interesting to refactor
go-clang
to ease the auto-generation of the API, usinggo-clang
itself.Obviously some bootstrapping is involve.
This issue is meant to document the design process.
The proposal would be the following:
sbinet/go-clang
repository and migrate it under (say)github.com/go-clang/bootstrap
go-clang/bootstrap
so only the required bits for parsing theclang/CIndex
API are includedgo-clang/clang/cmd/go-clang-gen-api
command, usinggo-clang/bootstrap
, to parse theclang/CIndex
API and generate acgo
package exposing a nice and idiomaticgo
API forclang/CIndex
. put the result as (say)go-clang/clang
a nice proof of concept has been put together at https://github.com/zimmski/go-clang-phoenix by @zimmski.
Benefits
clang
versionsclang
versionsConsiderations
go-clang/bootstrap
andgo-clang-gen-api
?go-clang-gen-api
really be undergo-clang/clang
?go-clang-gen-api
be able to handle allclang/CIndex
versions via a bigswitch clangVersion
?clang-x.y
branch for each version?//go:generate some-cmd
plumbing ?The text was updated successfully, but these errors were encountered: