-
Notifications
You must be signed in to change notification settings - Fork 287
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
refactor: Install headers into repo-equivalent directories. #2599
base: master
Are you sure you want to change the base?
Conversation
0c2dcc9
to
81dcc95
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2599 +/- ##
==========================================
+ Coverage 73.06% 73.13% +0.07%
==========================================
Files 149 149
Lines 30517 30517
==========================================
+ Hits 22297 22319 +22
+ Misses 8220 8198 -22 ☔ View full report in Codecov by Sentry. |
Feels a bit weird that a single |
Sorry, misclicked, didn't mean to close. |
74eaa35
to
877f118
Compare
Yes, it's quite troublesome when developing toxcore together with a client. Iterating on both client and toxcore development is slowed down quite a bit by having to make install each time. I don't suffer from this myself, because I develop mostly using bazel.
libsodium isn't co-developed with clients, so the above is less of an issue. libsodium also generally changes less, so installing it once is less overhead than installing toxcore many times as it's in active development.
Yes. Until it's too much of a burden.
Yes, and that's quite intentional. We should stay away from build system integrated codegen as much as possible. Generating files and committing them to git is ok, we already do that for events, and we may do more of that as part of semfmt, but we should always in principle own all our code.
Why is it better? This PR does not break any downstream projects.
It's not quite enough, because one other things that this change enables is that toxav could include "../toxcore/tox.h" instead of re-declaring
That's possible, but right now you can simply do
The 3 libraries are really quite separate libraries and should become even more separate. We're building a single .so for convenience (used to build multiple), but I can see a future in which toxav is maintained in a separate repo, build, install, etc (not necessarily in practice, but we should make it theoretically possible, so design decisions should move us towards that being possible).
Probably. I can't think of any right now, but I'm also not very interested in following precedents, and rather make logical decisions based on goals and requirements. |
d3ef35c
to
2b2ffba
Compare
Unfortunately, events and dispatch are already installed in .18, so we can't stop, but for .19, let's not add this private header if there's the possibility of moving it to a different location (TokTok#2599). Installing it makes it a chore for package maintainers (debian, pkgsrc).
Unfortunately, events and dispatch are already installed in .18, so we can't stop, but for .19, let's not add this private header if there's the possibility of moving it to a different location (TokTok#2599). Installing it makes it a chore for package maintainers (debian, pkgsrc).
@iphydf i think the autotools config was not updated to reflect the changes |
Yes that was intentional. Do you use the autotools build? I was keeping it around for unmaintained clients, so I didn't update it so there are fewer changes to those builds. |
2b2ffba
to
1a98760
Compare
This allows code to be built from an un-installed toxcore repo the same way it's built from an installed toxcore. I.e. all `#include` directives will work the same inside the toxcore repo and on a system which has toxcore installed. Previously, "toxcore/tox.h" was installed as "tox/tox.h", making `make install` a requirement for building any client code. Now, clients can be built directly from the repo source, which is especially nice for simple clients like echobots. Output: ``` -- Installing: /usr/local/include/tox/tox.h -- Installing: /usr/local/include/toxcore/tox.h -- Installing: /usr/local/include/toxcore/tox_events.h -- Installing: /usr/local/include/toxcore/tox_dispatch.h -- Installing: /usr/local/include/toxcore/tox_private.h -- Installing: /usr/local/include/tox/toxav.h -- Installing: /usr/local/include/toxav/toxav.h -- Installing: /usr/local/include/tox/toxencryptsave.h -- Installing: /usr/local/include/toxencryptsave/toxencryptsave.h ```
1a98760
to
8e59161
Compare
This allows code to be built from an un-installed toxcore repo the same way it's built from an installed toxcore. I.e. all
#include
directives will work the same inside the toxcore repo and on a system which has toxcore installed.Previously, "toxcore/tox.h" was installed as "tox/tox.h", making
make install
a requirement for building any client code. Now, clients can be built directly from the repo source, which is especially nice for simple clients like echobots.Output:
This change is