DM-28697: clean up include structure to guard against ODR violations#565
Open
DM-28697: clean up include structure to guard against ODR violations#565
Conversation
The compound field types that once used these are gone, so the only place we need them is in the backwards-compatibility reading code.
This commit guards against one-definition rule violations involving explicit specializations of the Key, KeyBase, and FieldBase classes by moving those specializations next to the default definitions of those templates and generally making includes more "self-sufficient": headers should now (at least mostly) include the headers for all classes they use directly, and should not rely on other headers being included for them in any source files (but that is always difficult to check). In a few cases I do assume that some headers (e.g. Schema.h) can be relied upon to include others (Key.h, Field.h) in higher-level code. This also removes a few includes that were not being used in those headers at all. That could cause downstream compile failures if source files or other headers were (incorrectly) relying on those incorrect includes, but such breakage should be easy to fix and is worth fixing anyway.
c6d2377 to
f3b6c5b
Compare
We no longer have any compound keys - they've been replaced by the FunctorKey concept instead. This lets us simplify a lot of code, especially in Schema.cc.
f3b6c5b to
1d8a8cd
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.