Skip to content

Commit e079db2

Browse files
committed
[Serialization] Update env var to disable precise tag check
Rename the env var to SWIFT_IGNORE_SWIFTMODULE_REVISION as it's recommended for use outside of testing.
1 parent 4579e37 commit e079db2

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Diff for: lib/Serialization/ModuleFileSharedCore.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ static ValidationInfo validateControlBlock(
356356
// Disable this restriction for compiler testing by setting this
357357
// env var to any value.
358358
static const char* ignoreRevision =
359-
::getenv("SWIFT_DEBUG_IGNORE_SWIFTMODULE_REVISION");
359+
::getenv("SWIFT_IGNORE_SWIFTMODULE_REVISION");
360360
if (ignoreRevision)
361361
break;
362362

Diff for: test/Serialization/restrict-swiftmodule-to-revision.swift

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ foo()
3737
// RUN: not %target-swift-frontend -typecheck %t/ResilientClient.swift -swift-version 5 -I %t/build -parse-stdlib -module-cache-path %t/cache 2>&1 | %FileCheck %s
3838
// CHECK: compiled module was created by a different version of the compiler; rebuild 'ResilientLib' and try again: {{.*}}ResilientLib.swiftmodule
3939

40-
/// Building a ResilientLib client should succeed for a tagged compiler with SWIFT_DEBUG_IGNORE_SWIFTMODULE_REVISION
41-
// RUN: env SWIFT_DEBUG_FORCE_SWIFTMODULE_REVISION=not-a-revision SWIFT_DEBUG_IGNORE_SWIFTMODULE_REVISION=true \
40+
/// Building a ResilientLib client should succeed for a tagged compiler with SWIFT_IGNORE_SWIFTMODULE_REVISION
41+
// RUN: env SWIFT_DEBUG_FORCE_SWIFTMODULE_REVISION=not-a-revision SWIFT_IGNORE_SWIFTMODULE_REVISION=true \
4242
// RUN: %target-swift-frontend -typecheck %t/ResilientClient.swift -swift-version 5 -I %t/build -parse-stdlib -module-cache-path %t/cache
4343

4444

0 commit comments

Comments
 (0)