Skip to content

[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

Merged
merged 1 commit into from
Jun 24, 2019

Conversation

marehr
Copy link
Member

@marehr marehr commented Jun 10, 2019

No description provided.

@marehr marehr requested a review from smehringer June 10, 2019 14:49
Copy link
Contributor

@rrahn rrahn left a 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

@@ -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)
Copy link
Contributor

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?

Copy link
Member Author

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

Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See core-developers chat.

Copy link
Member Author

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

@@ -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/")
Copy link
Contributor

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:

Suggested change
# 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?

Copy link
Member Author

@marehr marehr Jun 11, 2019

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

Copy link
Member Author

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
Copy link
Member

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"

Copy link
Member Author

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.

Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

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?

Copy link
Member Author

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?

Copy link
Contributor

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 🤔

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

@@ -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)
Copy link
Member

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?

@marehr marehr force-pushed the infra/header_test branch from 82f8c02 to dc719bc Compare June 14, 2019 00:51
@codecov
Copy link

codecov bot commented Jun 14, 2019

Codecov Report

Merging #1085 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1085   +/-   ##
=======================================
  Coverage   96.44%   96.44%           
=======================================
  Files         196      196           
  Lines        7733     7733           
=======================================
  Hits         7458     7458           
  Misses        275      275
Impacted Files Coverage Δ
...de/seqan3/argument_parser/detail/version_check.hpp 83.33% <ø> (ø) ⬆️
.../seqan3/search/algorithm/detail/search_trivial.hpp 86.11% <ø> (ø) ⬆️
.../seqan3/search/fm_index/detail/fm_index_cursor.hpp 100% <ø> (ø) ⬆️
...3/search/fm_index/detail/csa_alphabet_strategy.hpp 97.77% <ø> (ø) ⬆️
include/seqan3/alphabet/detail/hash.hpp 100% <ø> (ø) ⬆️
...rch/algorithm/detail/search_scheme_precomputed.hpp 100% <ø> (ø) ⬆️
include/seqan3/io/detail/misc_output.hpp 93.33% <ø> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update a6e5110...1289b88. Read the comment docs.

@marehr marehr force-pushed the infra/header_test branch 3 times, most recently from c2a3d25 to cf789a6 Compare June 14, 2019 09:12
@marehr marehr force-pushed the infra/header_test branch from cf789a6 to 1289b88 Compare June 17, 2019 23:58
@marehr marehr requested a review from smehringer June 17, 2019 23:59
@marehr
Copy link
Member Author

marehr commented Jun 19, 2019

@rrahn can you have a second look and if everything is fine merge?

@marehr marehr requested a review from h-2 June 21, 2019 15:17
@h-2 h-2 merged commit a9fdbfb into seqan:master Jun 24, 2019
@marehr marehr deleted the infra/header_test branch June 24, 2019 15:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants