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

Generate only one large library "libtoxcore". #442

Merged
merged 1 commit into from Dec 29, 2017
Merged

Conversation

@iphydf
Copy link
Member

@iphydf iphydf commented Jan 16, 2017

This library contains all the code for the old libtoxcore, libtoxav,
libtoxdns, and libtoxencryptsave. The build for toxav is still optional,
and disabling it causes libtoxcore to simply not contain those symbols
and the pkg-config file to not include opus and vpx as dependencies.


This change is Reviewable

@iphydf iphydf force-pushed the iphydf:one-big-lib branch from a83aa14 to b2a707c Jan 16, 2017
@iphydf iphydf added this to the v0.2.0 milestone Jan 16, 2017
@cebe
Copy link
Member

@cebe cebe commented Jan 17, 2017

@iphydf can you explain what you are doing here and why?

@iphydf iphydf force-pushed the iphydf:one-big-lib branch 10 times, most recently from da4c1ea to 183033a Jan 17, 2017
@iphydf
Copy link
Member Author

@iphydf iphydf commented Jan 22, 2017

@cebe I've added a top level comment to the CMakeLists.txt explaining what it does. Why: avoiding the ABI mess that is toxcore.

@iphydf iphydf force-pushed the iphydf:one-big-lib branch from 183033a to bf43f53 Jan 22, 2017
@robinlinden
Copy link
Member

@robinlinden robinlinden commented Jan 27, 2017

Reviewed 11 of 11 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.


Comments from Reviewable

@cebe cebe removed their assignment Jan 29, 2017
@SkyzohKey
Copy link

@SkyzohKey SkyzohKey commented Feb 13, 2017

:lgtm_strong:


Reviewed 11 of 11 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.


Comments from Reviewable

@iphydf iphydf force-pushed the iphydf:one-big-lib branch from bf43f53 to be4e321 Feb 16, 2017
@iphydf iphydf force-pushed the iphydf:one-big-lib branch 2 times, most recently from f6a3602 to 384e62b Feb 26, 2017
@iphydf iphydf force-pushed the iphydf:one-big-lib branch from 384e62b to 46cd427 Mar 12, 2017
@SkyzohKey SkyzohKey added the PR:ready label Mar 21, 2017
@iphydf iphydf force-pushed the iphydf:one-big-lib branch 2 times, most recently from acdedb4 to e5ad258 Mar 26, 2017
@iphydf iphydf force-pushed the iphydf:one-big-lib branch from e5ad258 to da1e6ac Apr 12, 2017
@iphydf iphydf force-pushed the iphydf:one-big-lib branch 2 times, most recently from 3be4ea0 to 557baf8 Sep 13, 2017
@iphydf iphydf force-pushed the iphydf:one-big-lib branch from 557baf8 to 1d73ee7 Oct 3, 2017
@iphydf
Copy link
Member Author

@iphydf iphydf commented Oct 4, 2017

@zoff99 it's always activated when building with CMake.

@zoff99
Copy link

@zoff99 zoff99 commented Oct 4, 2017

@iphydf making cmake and autotools build even more different is a bad idea.
it will break builds :-(

@Diadlo
Copy link

@Diadlo Diadlo commented Oct 5, 2017

@iphydf What if someone wants to link his app without toxav, and simultaneously link with toxav for another app, for example?

@iphydf iphydf force-pushed the iphydf:one-big-lib branch from 1d73ee7 to a7ffdbc Nov 13, 2017
@TokTok TokTok deleted a comment from CLAassistant Nov 19, 2017
@iphydf iphydf force-pushed the iphydf:one-big-lib branch 2 times, most recently from 2ca8bd3 to d6fb3df Nov 20, 2017
@iphydf
Copy link
Member Author

@iphydf iphydf commented Nov 20, 2017

@Diadlo do you or someone you know have that use case? Otherwise, YAGNI.

@iphydf
Copy link
Member Author

@iphydf iphydf commented Nov 20, 2017

@zoff99 I agree. So after this we should make autotools do the same.

@Diadlo
Copy link

@Diadlo Diadlo commented Nov 20, 2017

@iphydf It's just like interface segregation. I just don't understand, why you want to merge all function of public API in one library, if they logically different

@iphydf iphydf force-pushed the iphydf:one-big-lib branch 2 times, most recently from 3e9c956 to 8ac463f Dec 26, 2017
@iphydf
Copy link
Member Author

@iphydf iphydf commented Dec 28, 2017

@Diadlo I'll happily split it out again if and when toxav does not depend on toxcore internals.

The alternative is to have libraries split along the layer boundaries, so we end up having the many-small-libs situation, which we had before. That has different pros and cons. I hope toxav will eventually become independent of toxcore internals (@mannol has plans for this). At that point, I'd like toxav to be a separate repository, developed independently. In the meantime, the split is headaches for developers for no reason.

@iphydf
Copy link
Member Author

@iphydf iphydf commented Dec 28, 2017

Oh, and why that is an alternative: because then toxav can correctly depend on toxnetcrypto and other things it uses. Right now, toxav is lying because it says it only depend on toxcore, while actually it depends on its internals. If we expose the internals correctly (through libraries), we can have everything separated.

@robinlinden
Copy link
Member

@robinlinden robinlinden commented Dec 28, 2017

Reviewed 1 of 11 files at r1, 2 of 3 files at r2, 3 of 3 files at r3.
Review status: all files reviewed at latest revision, 6 unresolved discussions, all commit checks successful.


CMakeLists.txt, line 323 at r3 (raw file):

    toxav/video.h)
  target_link_modules(toxav toxgroup ${OPUS_LIBRARIES} ${VPX_LIBRARIES})
  #message("*** toxav_LINK_MODULES: ${toxav_LINK_MODULES}")

This should probably be removed.


CMakeLists.txt, line 359 at r3 (raw file):

# Link it to all dependencies.
foreach(sublib ${toxcore_SUBLIBS})
  #message("*** toxcore_LINK_MODULES += ${${sublib}_LINK_MODULES}  # ${sublib}_LINK_MODULES")

This should probably be removed.


cmake/ModulePackage.cmake, line 154 at r3 (raw file):

  foreach(dep ${ARGN})
    #message("*** Processing dep ${dep} for ${target}")

This should probably be removed.


cmake/ModulePackage.cmake, line 165 at r3 (raw file):

        list(FIND LINK_MODULES ${dep} _index)
        if(_index EQUAL -1)
          #message("*** Adding ${dep} to ${target}_LINK_MODULES.")

This should probably be removed.


cmake/StrictAbi.cmake, line 36 at r3 (raw file):

      OUTPUT_STRIP_TRAILING_WHITESPACE)
    string(REPLACE "\n" ";" sublib_SYMS ${sublib_SYMS})
  

Stray whitespace.


Comments from Reviewable

This library contains all the code for the old libtoxcore, libtoxav,
libtoxdns, and libtoxencryptsave. The build for toxav is still optional,
and disabling it causes libtoxcore to simply not contain those symbols
and the pkg-config file to not include opus and vpx as dependencies.
@iphydf iphydf force-pushed the iphydf:one-big-lib branch from 8ac463f to f2b6090 Dec 28, 2017
@iphydf
Copy link
Member Author

@iphydf iphydf commented Dec 28, 2017

Review status: all files reviewed at latest revision, 6 unresolved discussions, all commit checks successful.


CMakeLists.txt, line 386 at r2 (raw file):

Previously, cebe (Carsten Brandt) wrote…

what is this? looks super specific to a certain environment.

It's specific to toktok-stack, which is available to everyone (it's a github repo).


CMakeLists.txt, line 323 at r3 (raw file):

Previously, robinlinden (Robin Lindén) wrote…

This should probably be removed.

Done.


CMakeLists.txt, line 359 at r3 (raw file):

Previously, robinlinden (Robin Lindén) wrote…

This should probably be removed.

Done.


cmake/ModulePackage.cmake, line 154 at r3 (raw file):

Previously, robinlinden (Robin Lindén) wrote…

This should probably be removed.

Done.


cmake/ModulePackage.cmake, line 165 at r3 (raw file):

Previously, robinlinden (Robin Lindén) wrote…

This should probably be removed.

Done.


cmake/StrictAbi.cmake, line 36 at r3 (raw file):

Previously, robinlinden (Robin Lindén) wrote…

Stray whitespace.

Done.


Comments from Reviewable

@robinlinden
Copy link
Member

@robinlinden robinlinden commented Dec 28, 2017

:lgtm_strong:


Reviewed 3 of 3 files at r4.
Review status: all files reviewed at latest revision, 1 unresolved discussion.


Comments from Reviewable

@iphydf iphydf merged commit f2b6090 into TokTok:master Dec 29, 2017
5 checks passed
5 checks passed
ci/circleci Your tests passed on CircleCI!
Details
code-review/reviewable 1/1 LGTMs
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
license/cla Contributor License Agreement is signed.
Details
@iphydf iphydf deleted the iphydf:one-big-lib branch Dec 29, 2017
@iphydf iphydf modified the milestones: v0.2.0-RC1, v0.2.0 Jan 14, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

8 participants
You can’t perform that action at this time.