-
Notifications
You must be signed in to change notification settings - Fork 83
[INFRA] make every seqan3 header self-contained; no exceptions anymore #1085
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in general looks good! Some minor comments though
test/header/CMakeLists.txt
Outdated
@@ -5,7 +5,7 @@ | |||
# shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md | |||
# ----------------------------------------------------------------------------------------------------- | |||
|
|||
cmake_minimum_required (VERSION 3.2) | |||
cmake_minimum_required (VERSION 3.6) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Have you checked that this version is compliant with all platforms that also support at least gcc-7?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I upped the version, which we already implicitly required. Because we already use the following feature which is available since 3.6
list (FILTER header_files EXCLUDE REGEX "${exclude_regex}")
Since all builds go through since forever, this should have no impact
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you update the documentation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I didn't update the documentation. Or, do we want to set the minimal required version of cmake to 3.6? I'm happy to do that, but that would be out the scope of the PR.
I added a card for the dev meeting to discuss a general increase of cmake version.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See core-developers chat.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I moved the fix of the cmake versions to PR #1094 , so we can discuss this over there
test/header/CMakeLists.txt
Outdated
@@ -19,11 +19,11 @@ option (SEQAN3_FULL_HEADER_TEST "Test seqan3 headers as well as the headers of e | |||
# header guards are working by including the same header twice. | |||
# | |||
# example invocation: | |||
# seqan3_header_test (seqan3 "<path>/include/seqan3") | |||
# seqan3_header_test (seqan3 "<path>/include/seqan3" "/exclude_regex|more_exclude/") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand the example.
Should more_exclude mean I can add more exclude patterns?
Then I suggest:
# seqan3_header_test (seqan3 "<path>/include/seqan3" "/exclude_regex|more_exclude/") | |
# seqan3_header_test (seqan3 "<path>/include/seqan3" "") - Nothing will be excluded | |
# seqan3_header_test (seqan3 "<path>/include/seqan3" "/exclude_regex/[|more_excludes...]") - separate multiple exludes with | |
or can I only specify one more exlude?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no you can give any regex. I'll change the example
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added more info, can you recheck?
// structs: to_chars_result, from_chars_result and chars_format | ||
// ----------------------------------------------------------------------------- | ||
|
||
namespace std |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Now non-detail stuff is in a detail folder o.O
I deliberately separated the "public API stuff I copied" from the "detail stuff to make public API work that I messed with"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's mainly why I assigned you.
The problem is if we don't do it this way, we get weird include order issues. Because, charconv_detail.hpp
needs stuff from charconv.hpp
, but on the other hand charconv.hpp
needs charconv_detail.hpp
.
If you have an idea how to keep the current structure with the separation of the public and private API, but without this dependency loop. I'm happy to change this. The documentation will still be public even if it defined within the detail
file.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where do we get these weird issues? I thought the include order is clearly defined
// some code that is needed in detail.hpp
#include <detail.hpp>
// some code that is dependent on detail.hpp
I thought this is the way includes work? The only thing is that detail.hpp cannot be independently included somewhere else, but it should not need to be as it is a detail header?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, but like the title says no exceptions anymore, even our detail code should be includeable in any order.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
:( but why? when did we decide on that?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We resolved this today at a quick strategy meeting, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes by merging the detail header into the non-detail header, right 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
test/header/CMakeLists.txt
Outdated
@@ -5,7 +5,7 @@ | |||
# shipped with this file and also available at: https://github.com/seqan/seqan3/blob/master/LICENSE.md | |||
# ----------------------------------------------------------------------------------------------------- | |||
|
|||
cmake_minimum_required (VERSION 3.2) | |||
cmake_minimum_required (VERSION 3.6) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you update the documentation?
82f8c02
to
dc719bc
Compare
Codecov Report
@@ Coverage Diff @@
## master #1085 +/- ##
=======================================
Coverage 96.44% 96.44%
=======================================
Files 196 196
Lines 7733 7733
=======================================
Hits 7458 7458
Misses 275 275
Continue to review full report at Codecov.
|
c2a3d25
to
cf789a6
Compare
cf789a6
to
1289b88
Compare
@rrahn can you have a second look and if everything is fine merge? |
No description provided.