Giter Club home page Giter Club logo

Comments (7)

rpoyner-tri avatar rpoyner-tri commented on August 18, 2024

I don't know that Ventura and XCode 15 are compatble. I could be that the best Ventura could host is XCode 14.3.1. From the evidence I have so far, that version doesn't solve our spaceship problems.

from drake.

jwnimmer-tri avatar jwnimmer-tri commented on August 18, 2024

Does XCode 15.2 have a sufficient spaceship?

Xcode 15.2 requires a Mac running macOS Ventura 13.5 or later.
-- https://developer.apple.com/documentation/xcode-release-notes/xcode-15_2-release-notes

from drake.

rpoyner-tri avatar rpoyner-tri commented on August 18, 2024

Apparently XCode 15.2 does not have sufficient spaceship, based on my experiments so far. Details below.

  • Installed XCode 15.2 from manually downloaded .xip file on an internal M2 machine running Ventura 13.6.7.
  • Tried to build a reduced test case (see below); failed with errors like those seen before.
diff --git a/common/test/type_safe_index_test.cc b/common/test/type_safe_index_test.cc
index d546e9d908..11708d7ae5 100644
--- a/common/test/type_safe_index_test.cc
+++ b/common/test/type_safe_index_test.cc
@@ -1,6 +1,8 @@
 #include "drake/common/type_safe_index.h"
 
+#include <compare>
 #include <limits>
+#include <optional>
 #include <regex>
 #include <sstream>
 #include <string>
@@ -605,6 +607,18 @@ GTEST_TEST(TypeSafeIndex, SortedPairIndexHashable) {
   EXPECT_TRUE(pairs.contains(SortedPair<AIndex>(a1, a2)));
 }
 
+GTEST_TEST(TypeSafeIndex, OptionalCompare) {
+  struct Thing {
+    std::optional<AIndex> field;
+    auto operator<=>(const Thing&) const = default;
+  };
+  Thing thing1;
+  thing1.field = AIndex(1);
+  Thing thing2;
+  thing2.field = AIndex(2);
+  EXPECT_TRUE(thing1 < thing2);
+}
+

Among the frustrations (never mind the ridiculously bad installation processes), there is no convenient way to get a reliable version number out of Xcode. You'd hope that clang --version would be useful, but it is the same sometimes across different Xcode versions. Internet advice promised good things from softwareupdate --history, but it is completely oblivious to "side-loading" -- installing from downloaded archives instead of using GUI updaters (which often won't do what you want).

So, today's version extraction command recommendation is something like:

$ cat /Applications/Xcode.app/Contents/version.plist |grep -A1 ShortVersion |tail -n1 |sed 's#.*>\(.*\)<.*#\1#g' 

from drake.

jwnimmer-tri avatar jwnimmer-tri commented on August 18, 2024

I suppose if "XCode 15.x" is not enough of a precise victory condition, then the next question is which version of XCode is sufficiently new enough? You have a successful result with ... 15.4? There's not that many versions newer than 15.2, so I guess it's a recent fix. None of Apple's release notes seem to mention this.

from drake.

rpoyner-tri avatar rpoyner-tri commented on August 18, 2024

15.3 seems to be good enough, but that is not documented to support being hosted on Ventura.

from drake.

jwnimmer-tri avatar jwnimmer-tri commented on August 18, 2024

Even if we could force 15.3 into CI, it seems like asking users to install it using an off-nominal procedure would be too risky of a proposition. I think that means we max out at 15.2 until October 2024, when we drop support for Ventura.

It sounds like 15.2 doesn't actually help us, really? In that case, we should close this issue and save the work of CI upgrades.

from drake.

rpoyner-tri avatar rpoyner-tri commented on August 18, 2024

There's the small win of "some older xcode doesn't even string<=>string", but meh. /me dusts off 6-operator comparison. strncmp, anyone?

from drake.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.