Skip to content

Commit

Permalink
Merge pull request #10 from oreiche/stable-1.2
Browse files Browse the repository at this point in the history
Stable 1.2.2
  • Loading branch information
oreiche authored Oct 17, 2023
2 parents 192a30f + e1ee046 commit eb8626f
Show file tree
Hide file tree
Showing 14 changed files with 38 additions and 11 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## Release `1.2.2` (2023-10-17)

Bug fixes on top of release `1.2.1`.

### Fixes

- Proper handling of fetch errors in `just-mr`
- Portability improvements: bootstrapping with `-Wno-pedantic`,
case-insensitive naming, fixed version ranges in conditionals

## Release `1.2.1` (2023-08-29)

Bug fixes on top of release `1.2.0`.
Expand Down
4 changes: 2 additions & 2 deletions bin/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@
CONF = json.loads(os.environ['JUST_BUILD_CONF'])

if "PACKAGE" in os.environ:
CONF["ADD_CFLAGS"] = ["-Wno-error"] + CONF.get("ADD_CFLAGS", [])
CONF["ADD_CXXFLAGS"] = ["-Wno-error"] + CONF.get("ADD_CXXFLAGS", [])
CONF["ADD_CFLAGS"] = ["-Wno-error", "-Wno-pedantic"] + CONF.get("ADD_CFLAGS", [])
CONF["ADD_CXXFLAGS"] = ["-Wno-error", "-Wno-pedantic"] + CONF.get("ADD_CXXFLAGS", [])

ARCHS = {
'i686':'x86',
Expand Down
2 changes: 1 addition & 1 deletion src/buildtool/main/version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
auto version() -> std::string {
std::size_t major = 1;
std::size_t minor = 2;
std::size_t revision = 1;
std::size_t revision = 2;
std::string suffix = std::string{};
#ifdef VERSION_EXTRA_SUFFIX
suffix += VERSION_EXTRA_SUFFIX;
Expand Down
14 changes: 11 additions & 3 deletions src/other_tools/ops_maps/content_cas_map.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,14 +120,22 @@ auto CreateContentCASMap(JustMR::PathsPtr const& just_mr_paths,
}
// add the fetched data to CAS
auto path = JustMR::Utils::AddToCAS(*data);
// check one last time if content is in CAS now
// check that storing the fetched data succeeded
if (not path) {
(*logger)(fmt::format("Failed to fetch a file with id {} from {}",
key.content,
(*logger)(fmt::format("Failed to store fetched content from {}",
key.fetch_url),
/*fatal=*/true);
return;
}
// check that the data we stored actually produces the requested digest
if (not cas.BlobPath(digest, /*is_executable=*/false)) {
(*logger)(fmt::format(
"Content {} was not found at given fetch location {}",
key.content,
key.fetch_url),
/*fatal=*/true);
return;
}
JustMRProgress::Instance().TaskTracker().Stop(key.origin);
(*setter)(true);
};
Expand Down
8 changes: 8 additions & 0 deletions src/other_tools/utils/curl_easy_handle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ auto CurlEasyHandle::DownloadToFile(
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg, hicpp-vararg)
curl_easy_setopt(handle_.get(), CURLOPT_FOLLOWLOCATION, 1);

// ensure failure on error codes that otherwise might return OK
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg, hicpp-vararg)
curl_easy_setopt(handle_.get(), CURLOPT_FAILONERROR, 1);

// set callback for writing to file
std::ofstream file(file_path.c_str(), std::ios::binary);

Expand Down Expand Up @@ -194,6 +198,10 @@ auto CurlEasyHandle::DownloadToString(std::string const& url) noexcept
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg, hicpp-vararg)
curl_easy_setopt(handle_.get(), CURLOPT_FOLLOWLOCATION, 1);

// ensure failure on error codes that otherwise might return OK
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg, hicpp-vararg)
curl_easy_setopt(handle_.get(), CURLOPT_FAILONERROR, 1);

// set callback for writing to string
std::string content{};

Expand Down
9 changes: 5 additions & 4 deletions src/utils/cpp/path_hash.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,13 @@

#include <filesystem>

auto constexpr kGLIBCXX_11_4 = 20230528; // gcc/DATESTAMP of version 11.4
#if (defined(__GLIBCXX__) and _GLIBCXX_RELEASE < 12 and \
__GLIBCXX__ != kGLIBCXX_11_4) or \
// NOLINTNEXTLINE(cppcoreguidelines-macro-usage)
#define GLIBCXX_11_4 20230528 // gcc/DATESTAMP of version 11.4
#if (defined(__GLIBCXX__) and _GLIBCXX_RELEASE < 12 and \
!(_GLIBCXX_RELEASE == 11 and __GLIBCXX__ >= GLIBCXX_11_4)) or \
(defined(_LIBCPP_VERSION) and _LIBCPP_VERSION < 16000)
// std::hash<std::filesystem::path> is missing for
// - GNU's libstdc++ < 12 (except 11.4)
// - GNU's libstdc++ < 11.4
// - LLVM's libcxx < 16 (see https://reviews.llvm.org/D125394)
namespace std {
template <>
Expand Down
2 changes: 1 addition & 1 deletion test/end-to-end/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
[ [["./", "actions", "TESTS"], "actions"]
, [["./", "cli", "TESTS"], "cli"]
, [["./", "generated-binary", "TESTS"], "generated-binary"]
, [["./", "targets", "TESTS"], "targets"]
, [["./", "target-tests", "TESTS"], "targets"]
, [["./", "user-errors", "TESTS"], "user-errors"]
, [["./", "built-in-rules", "TESTS"], "built-in-rules"]
, [["./", "build-fails", "TESTS"], "build-fails"]
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit eb8626f

Please sign in to comment.