boostorg / spirit

Boost.org spirit module
http://boost.org/libs/spirit
392 stars 161 forks source link

Extract individual library versions #425

Open Mike-Devel opened 5 years ago

Mike-Devel commented 5 years ago

Is there a simple way to only extract the files relevant to Spirit classic/v2/x3? Unfortunately, it is not at all clear from the project structure what belongs to what.

Have you considered to use a separate repository for each of those libraries (not sure if boost rules allow this, or be desirable for your project at all - just a thought that came to my mind)?

teajay-fr commented 5 years ago

If I recall correctly there is a tool to extract boost libraries with all their dependencies. You can take a look at this stackoverflow question: https://stackoverflow.com/questions/2150836/how-to-extract-the-boost-interprocess-library (https://stackoverflow.com/questions/2150836/how-to-extract-the-boost-interprocess-library) Hope this helps.

Thomas Bernard

17 décembre 2018 16:05 "Mike-Devel" <notifications@github.com (mailto:%22Mike-Devel%22%20notifications@github.com)> a écrit: Is there a simple way to only extract the files relevant to Spirit classic/v2/x3? Unfortunately, it is not at all clear from the project structure what belongs to what.

Have you considered to use a separate repository for each of those libraries (not sure if boost rules allow this)? 

—

You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub (https://github.com/boostorg/spirit/issues/425), or mute the thread (https://github.com/notifications/unsubscribe-auth/AFt5U5EEhlC3ZpNQ9rrgeZ9y-ifetOEdks5u57HJgaJpZM4ZWhjf).

Mike-Devel commented 5 years ago

I probably should have been more explicit. I meant only the files for classic OR for v2 OR x3 from this repository. IIRC, bcp will not distinguish between them.

Kojoley commented 5 years ago

The Spirit has a very clear structure. Splitting is not a thing that is promoted or supported, but should be simple to achieve.

You also can list the only headers that is required with Clang echo #include "boost/spirit/home/x3.hpp" | clang -I"path/to/boost" -H -fsyntax-only -x c++ - 2>&1 | grep -oe boost/spirit/.*

Mike-Devel commented 5 years ago

x3 seems to also have some dependencies on boost/spirit/home/support/ e.g. here: https://github.com/boostorg/spirit/blob/e14eaa3057a48776371a557631422deeb0ad81de/include/boost/spirit/home/x3/char/char.hpp#L11-L14.

Thank you very much for the script that will be very helpful. Seems like GitHub has eaten some of your quotes though. Should be:

echo '#include "boost/spirit/home/x3.hpp"' | clang -I"path/to/boost" -H -fsyntax-only -x c++ - 2>&1 | grep -oe "boost/spirit/.*"
Kojoley commented 4 years ago

@djowel how do you look at splitting classic into its own repository? There are some precedents in boost of doing that to break dependency cycles. It will also decrease the number of dependencies people have to install if they are not needed classic (boost_thread and its subdependencies).

djowel commented 4 years ago

@djowel how do you look at splitting classic into its own repository? There are some precedents in boost of doing that to break dependency cycles. It will also decrease the number of dependencies people have to install if they are not needed classic (boost_thread and its subdependencies).

Good question. I think it is a good idea.

Mike-Devel commented 4 years ago

Would it make sense to go even one step further and separate each version (classic, v2, x3) into a separate repo? Or are v2 and x3 closely coupled?