Skip to content

Commit

Permalink
Merging 'develop' into 'master' for 1.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
ldionne committed Aug 26, 2020
2 parents 07b4249 + 28699a4 commit bf42400
Show file tree
Hide file tree
Showing 13 changed files with 707 additions and 440 deletions.
17 changes: 7 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ matrix:
# Xcode 9.1
- os: osx
env: UNIT_TESTS=true BOOST_VERSION=default
osx_image: xcode9.1
osx_image: xcode11

##########################################################################
# Build with variations in the configuration
Expand Down Expand Up @@ -85,7 +85,7 @@ matrix:
# Without exceptions on OS X
- os: osx
env: UNIT_TESTS=true BOOST_VERSION=default CMAKE_OPTIONS="-DBOOST_HANA_ENABLE_EXCEPTIONS=OFF"
osx_image: xcode9.1
osx_image: xcode11

# With Boost 1.64
- env: UNIT_TESTS=true COMPILER=default BOOST_VERSION=1.64.0
Expand All @@ -106,14 +106,13 @@ matrix:
# With Boost.Build instead of CMake (on OS X)
- os: osx
env: BOOST_BUILD=true BOOST_VERSION=default
osx_image: xcode9.1
osx_image: xcode11

##########################################################################
# Generate the documentation
##########################################################################
- env: DOCUMENTATION=true COMPILER=default BOOST_VERSION=default
dist: xenial
addons: *defaults
- os: osx
env: DOCUMENTATION=true BOOST_VERSION=default

##########################################################################
# Benchmarks
Expand Down Expand Up @@ -227,9 +226,7 @@ install:
############################################################################
- |
if [[ "${DOCUMENTATION}" == "true" ]]; then
DOXYGEN_URL="http://doxygen.nl/files/doxygen-1.8.15.linux.bin.tar.gz"
mkdir doxygen && travis_retry wget --quiet -O - ${DOXYGEN_URL} | tar --strip-components=1 -xz -C doxygen
export PATH=${DEPS_DIR}/doxygen/bin:${PATH}
brew install doxygen
doxygen --version
fi
Expand Down Expand Up @@ -284,7 +281,7 @@ script:
############################################################################
- |
if [[ "${DOCUMENTATION}" == "true" ]]; then
(cd build && ! make doc 2>&1 | grep -E "warning|error") || exit 1
(cd build && ! make doc 2>&1 | grep -E "error") || exit 1
if [[ "${TRAVIS_PULL_REQUEST}" == "false" && "${TRAVIS_BRANCH}" == "master" ]]; then
# Suppress output to avoid leaking the token when the command fails
Expand Down
24 changes: 7 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,22 +171,13 @@ Please see [LICENSE.md](LICENSE.md).
## Releasing
This section acts as a reminder of the few simple steps required to release a
new version of the library. This is only relevant to Hana's developers. To
release a new version of the library, make sure the current version in
`include/boost/hana/version.hpp` matches the release you're about to publish.
Then, create an annotated tag with:
```sh
git tag -a --file=- v<version> <<EOM
...your message here...
EOM
```
Then, push the tag and create a new GitHub release pointing to that tag. Make
sure to include the release notes in `RELEASE_NOTES.md` in that GitHub release.
Once that is done, bump the version number in `include/boost/hana/version.hpp`
so that it matches the next _planned_ release. Finally, do not forget to update
the [Homebrew formula][] to point to the latest version.
To release a new version of Hana, use the `util/release.sh` script. The script
will merge `develop` to `master`, create a tag on `master` and then bump the
version on `develop`. The tag on `master` will be annotated with the contents
of the `RELEASE_NOTES.md` file. Once the `release.sh` script has been run, the
`master` and `develop` branches should be pushed manually, as well as the tag
that was created on `master`. Finally, create a GitHub release pointing to the
new tag on `master`.
<!-- Links -->
Expand All @@ -200,4 +191,3 @@ the [Homebrew formula][] to point to the latest version.
[eRuby]: http://en.wikipedia.org/wiki/ERuby
[Hana.docs]: http://boostorg.github.io/hana
[Hana.wiki]: https://github.com/boostorg/hana/wiki
[Homebrew formula]: https://github.com/Homebrew/homebrew-core/blob/master/Formula/hana.rb
14 changes: 9 additions & 5 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
## These are the Release notes for the next release of Hana
- Official support for Xcode 6, 7 and 8, and LLVM Clang 3.5, 3.6, 3.7, and 3.8
has has been dropped. The library should still work with these compilers,
however they are not being tested regularly anymore, so they are not
officially supported.
Release notes for Hana 1.6.1
============================

- Official support for Xcode 6, 7 and 8, 9, 10 and LLVM Clang 3.5, 3.6, 3.7,
and 3.8 has has been dropped. The library should still work with these
compilers, however they are not being tested regularly anymore, so they are
not officially supported.
- The `hana::traits::result_of` trait has been removed. Since `std::result_of`
has been removed from the Standard in C++20, users should move away from it.
55 changes: 35 additions & 20 deletions doc/js/highcharts-data.js

Large diffs are not rendered by default.

55 changes: 37 additions & 18 deletions doc/js/highcharts-exporting.js

Large diffs are not rendered by default.

865 changes: 533 additions & 332 deletions doc/js/highcharts.js

Large diffs are not rendered by default.

32 changes: 11 additions & 21 deletions doc/tutorial.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,13 +52,7 @@ have a couple of options:
Hana is included in the [Boost][] distribution starting from Boost 1.61.0, so
installing that will give you access to Hana.
2. __Use Homebrew__\n
On Mac OS, Hana can be installed with [Homebrew][]:
@code{.sh}
brew install hana
@endcode
3. __Install manually__\n
2. __Install manually__\n
You can download the code from the official GitHub [repository][Hana.repository]
and install the library manually by issuing the following commands from the root
of the project (requires [CMake][]):
Expand All @@ -78,22 +72,18 @@ If you just want to contribute to Hana, you can see how to best setup your
environment for development in the [README][Hana.hacking].
@note
- Both the manual installation and the Homebrew installation will also install
a `HanaConfig.cmake` file for use with CMake and a `hana.pc` file for use with
[pkg-config][].
- Do not mix a standalone installation of Hana (i.e. Hana not installed through
Boost) with a full installation of Boost. The Hana provided within Boost and
the standalone one may clash, and you won't know which version is used where.
This is asking for trouble.
Do not mix a standalone installation of Hana (i.e. Hana not installed through
Boost) with a full installation of Boost. The Hana provided within Boost and
the standalone one may clash, and you won't know which version is used where.
This is asking for trouble.
@subsection tutorial-installation-cmake Note for CMake users
If you use [CMake][], depending on Hana has never been so easy. When installed,
Hana creates a `HanaConfig.cmake` file that exports the `hana` interface library
target with all the required settings. All you need is to install Hana (through
Homebrew or manually), use `find_package(Hana)`, and then link your own targets
against the `hana` target. Here is a minimal example of doing this:
If you use [CMake][], depending on Hana has never been so easy. When installed
manually, Hana creates a `HanaConfig.cmake` file that exports the `hana`
interface library target with all the required settings. All you need is to
install Hana manually with CMake, use `find_package(Hana)`, and then link your
own targets against the `hana` target. Here is a minimal example of doing this:
@snippet example/cmake_integration/CMakeLists.txt snip
Expand Down Expand Up @@ -206,7 +196,7 @@ constexpr int factorial(int n) {
}
template <typename T, std::size_t N, typename F>
constexpr std::array<std::result_of_t<F(T)>, N>
constexpr std::array<std::invoke_result_t<F, T>, N>
transform(std::array<T, N> array, F f) {
// ...
}
Expand Down
2 changes: 1 addition & 1 deletion include/boost/hana/string.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ BOOST_HANA_NAMESPACE_BEGIN
constexpr auto operator"" _s() {
static_assert(std::is_same<CharT, char>::value,
"hana::string: Only narrow string literals are supported with "
"the _s string literal right now. See https://goo.gl/fBbKD7 "
"the _s string literal right now. See https://github.com/boostorg/hana/issues/80 "
"if you need support for fancier types of compile-time strings.");
return hana::string_c<s...>;
}
Expand Down
1 change: 0 additions & 1 deletion include/boost/hana/traits.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,6 @@ BOOST_HANA_NAMESPACE_BEGIN namespace traits {

constexpr auto common_type = metafunction<std::common_type>;
constexpr auto underlying_type = metafunction<std::underlying_type>;
constexpr auto result_of = metafunction<std::result_of>;


///////////////////////
Expand Down
2 changes: 1 addition & 1 deletion include/boost/hana/version.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ Distributed under the Boost Software License, Version 1.0.

//! @ingroup group-config
//! Macro expanding to the patch level of the library, i.e. the `z` in `x.y.z`.
#define BOOST_HANA_PATCH_VERSION 0
#define BOOST_HANA_PATCH_VERSION 1

//! @ingroup group-config
//! Macro expanding to the full version of the library, in hexadecimal
Expand Down
12 changes: 0 additions & 12 deletions test/functional/apply.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,6 @@ void test_b12(Functor&& f) {
);
static_assert(std::is_same<DeducedReturnType, Expect>::value, "");

// Check that result_of_t matches Expect.
using ResultOfReturnType = typename std::result_of<ClassFunc&&(Functor&&, NonCopyable&&)>::type;
static_assert(std::is_same<ResultOfReturnType, Expect>::value, "");

// Run invoke and check the return value.
DeducedReturnType ret = hana::apply(func_ptr, std::forward<Functor>(f), std::move(arg));
BOOST_HANA_RUNTIME_CHECK(ret == 42);
Expand All @@ -84,10 +80,6 @@ void test_b34(Functor&& f) {
);
static_assert(std::is_same<DeducedReturnType, Expect>::value, "");

// Check that result_of_t matches Expect.
using ResultOfReturnType = typename std::result_of<ClassFunc&&(Functor&&)>::type;
static_assert(std::is_same<ResultOfReturnType, Expect>::value, "");

// Run invoke and check the return value.
DeducedReturnType ret = hana::apply(func_ptr, std::forward<Functor>(f));
BOOST_HANA_RUNTIME_CHECK(ret == 42);
Expand All @@ -103,10 +95,6 @@ void test_b5(Functor&& f) {
);
static_assert(std::is_same<DeducedReturnType, Expect>::value, "");

// Check that result_of_t matches Expect.
using ResultOfReturnType = typename std::result_of<Functor&&(NonCopyable&&)>::type;
static_assert(std::is_same<ResultOfReturnType, Expect>::value, "");

// Run invoke and check the return value.
DeducedReturnType ret = hana::apply(std::forward<Functor>(f), std::move(arg));
BOOST_HANA_RUNTIME_CHECK(ret == 42);
Expand Down
2 changes: 0 additions & 2 deletions test/type/traits.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,6 @@ int main() {

hana::traits::common_type(s, s);
hana::traits::underlying_type(e);
using FunctionPointer = void(*)();
hana::traits::result_of(hana::type_c<FunctionPointer(void)>);

///////////////////////
// Utilities
Expand Down
66 changes: 66 additions & 0 deletions util/release.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
#!/usr/bin/env bash

set -e

PROGNAME="$(basename "${0}")"
function usage() {
cat <<EOF
Usage:
${PROGNAME} <next-version>
This script merges 'develop' to 'master' and tags a release on the 'master'
branch. It then bumps the version on 'develop' to the next planned version.
<next-version> must be of the form X.Y.Z, where X, Y and Z are numbers.
This script should be run from the root of the repository without any
uncommitted changes.
EOF
}

for arg in $@; do
if [[ "${arg}" == "-h" || "${arg}" == "--help" ]]; then
usage
exit 0
fi
done

if [[ $# -ne 1 ]]; then
echo "Missing the version"
usage
exit 1
fi

next_version="${1}"
next_major="$(echo ${next_version} | cut -d '.' -f 1)"
next_minor="$(echo ${next_version} | cut -d '.' -f 2)"
next_patch="$(echo ${next_version} | cut -d '.' -f 3)"
if [[ -z "${next_major}" || -z "${next_minor}" || -z "${next_patch}" ]]; then
echo "The version was specified incorrectly"
usage
exit 1
fi

current_major="$(sed -n -E 's/#define BOOST_HANA_MAJOR_VERSION ([0-9]+)/\1/p' include/boost/hana/version.hpp)"
current_minor="$(sed -n -E 's/#define BOOST_HANA_MINOR_VERSION ([0-9]+)/\1/p' include/boost/hana/version.hpp)"
current_patch="$(sed -n -E 's/#define BOOST_HANA_PATCH_VERSION ([0-9]+)/\1/p' include/boost/hana/version.hpp)"
current_version="${current_major}.${current_minor}.${current_patch}"

git checkout --quiet master
git merge --quiet develop -m "Merging 'develop' into 'master' for ${current_version}"
echo "Merged 'develop' into 'master' -- you should push 'master' when ready"

tag="v${current_major}.${current_minor}.${current_patch}"
git tag -a --file=RELEASE_NOTES.md "${tag}"
echo "Created tag ${tag} on 'master' -- you should push it when ready"

git checkout --quiet develop
sed -i '' -E "s/#define BOOST_HANA_MAJOR_VERSION [0-9]+/#define BOOST_HANA_MAJOR_VERSION ${next_major}/" include/boost/hana/version.hpp
sed -i '' -E "s/#define BOOST_HANA_MINOR_VERSION [0-9]+/#define BOOST_HANA_MINOR_VERSION ${next_minor}/" include/boost/hana/version.hpp
sed -i '' -E "s/#define BOOST_HANA_PATCH_VERSION [0-9]+/#define BOOST_HANA_PATCH_VERSION ${next_patch}/" include/boost/hana/version.hpp
cat <<EOF > RELEASE_NOTES.md
Release notes for Hana ${next_version}
============================
EOF
git add include/boost/hana/version.hpp RELEASE_NOTES.md
git commit --quiet -m "Bump version of Hana to ${next_version} and clear release notes"
echo "Bumped the version of Hana on 'develop' to ${next_version} -- you should push 'develop' when ready"

0 comments on commit bf42400

Please sign in to comment.