diff --git a/CHANGELOG.md b/CHANGELOG.md index af80d6af78..475141d543 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ Important changes to data models, configuration, and migrations between each AppEngine version, listed here to ease deployment and troubleshooting. ## Next Release (replace with git tag when deployed) + * Bumped runtimeVersion to `2024.10.21`. ## `20241017t095600-all` * Bumped runtimeVersion to `2024.10.15`. diff --git a/app/lib/shared/versions.dart b/app/lib/shared/versions.dart index 0e88e0dabf..0dad578b0f 100644 --- a/app/lib/shared/versions.dart +++ b/app/lib/shared/versions.dart @@ -24,10 +24,10 @@ final RegExp runtimeVersionPattern = RegExp(r'^\d{4}\.\d{2}\.\d{2}$'); /// when the version switch happens. const _acceptedRuntimeVersions = [ // The current [runtimeVersion]. - '2024.10.15', + '2024.10.21', // Fallback runtime versions. + '2024.10.15', '2024.09.17', - '2024.09.10', ]; /// Sets the current runtime versions. diff --git a/pkg/pub_worker/lib/src/bin/pana_wrapper.dart b/pkg/pub_worker/lib/src/bin/pana_wrapper.dart index 5b603f2d37..4a42426717 100644 --- a/pkg/pub_worker/lib/src/bin/pana_wrapper.dart +++ b/pkg/pub_worker/lib/src/bin/pana_wrapper.dart @@ -18,6 +18,7 @@ import 'package:pub_worker/src/bin/dartdoc_wrapper.dart'; import 'package:pub_worker/src/fetch_pubspec.dart'; import 'package:pub_worker/src/sdks.dart'; import 'package:pub_worker/src/utils.dart'; +import 'package:pubspec_parse/pubspec_parse.dart' as pubspek; import 'package:retry/retry.dart'; final _log = Logger('pana'); @@ -207,6 +208,8 @@ Future<({String configKind, String? dartSdkPath, String? flutterSdkPath})> flutterSdks.firstWhereOrNull((sdk) => !sdk.version.isPreRelease) ?? flutterSdks.firstOrNull; + final minMacrosVersion = pubspec.getDependencyContraintRangeMin('macros'); + bool matchesSdks({ required Version? dart, required Version? flutter, @@ -237,6 +240,20 @@ Future<({String configKind, String? dartSdkPath, String? flutterSdkPath})> return false; } + // temporary exception for macros on 3.5 SDK + // TODO: remove after 3.6 SDK gets released + if (minMacrosVersion != null && + minMacrosVersion.compareTo(Version.parse('0.1.3-main.0')) >= 0) { + if (dart != null && dart.major == 3 && dart.minor == 5) { + return false; + } + if (flutterDartSdk != null && + flutterDartSdk.major == 3 && + flutterDartSdk.minor == 5) { + return false; + } + } + // Otherwise accepting the analysis SDK bundle. return true; } @@ -402,3 +419,17 @@ Future> _detectSdkBundles() async { ), ]; } + +extension on Pubspec { + Version? getDependencyContraintRangeMin(String package) { + final dep = dependencies[package] ?? devDependencies[package]; + if (dep is! pubspek.HostedDependency) { + return null; + } + final vc = dep.version; + if (vc is! VersionRange) { + return null; + } + return vc.min; + } +}