Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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`.
Expand Down
4 changes: 2 additions & 2 deletions app/lib/shared/versions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,10 @@ final RegExp runtimeVersionPattern = RegExp(r'^\d{4}\.\d{2}\.\d{2}$');
/// when the version switch happens.
const _acceptedRuntimeVersions = <String>[
// 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.
Expand Down
31 changes: 31 additions & 0 deletions pkg/pub_worker/lib/src/bin/pana_wrapper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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;
}
Expand Down Expand Up @@ -402,3 +419,17 @@ Future<List<_SdkBundle>> _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;
}
}
Loading