Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[test] TreeDictionary.Keys: Remove stray print that’s flooding test output #370

Open
wants to merge 1 commit into
base: release/1.1
Choose a base branch
from

Conversation

lorentey
Copy link
Member

The test_isEqual_exhaustive test includes a stray print statement that is flooding test output with a myriad lines of useless data.

Checklist

  • I've read the Contribution Guidelines
  • My contributions are licensed under the Swift license.
  • I've followed the coding style of the rest of the project.
  • I've added tests covering all new code paths my change adds to the project (if appropriate).
  • I've added benchmarks covering new functionality (if appropriate).
  • I've verified that my change does not break any existing tests or introduce unexplained benchmark regressions.
  • I've updated the documentation if necessary.

@lorentey lorentey added this to the 1.1.1 milestone Apr 23, 2024
@lorentey
Copy link
Member Author

@swift-ci test

@vanvoorden
Copy link
Contributor

@lorentey Ahh… this is a good fix! Sorry about that one. Would these fixes happen enough that some kind of linter that automatically flags a diff with print in test code would be impactful?

@lorentey
Copy link
Member Author

@vanvoorden Oh I didn't even remember this was a recent addition. This is not a big deal! And it's pretty easy to catch by looking through CI output -- which is how this one came to light.

It can be legitimate for tests to print, and I don't think we want to develop a linter for this. We can simply catch these as they happen.

@lorentey
Copy link
Member Author

Huh, this isn't ideal:

swift-frontend: /home/build-user/swift/include/swift/SIL/AbstractionPattern.h:529: void swift::Lowering::AbstractionPattern::initSwiftType(swift::SubstitutionMap, swift::CanGenericSignature, swift::CanType, swift::Lowering::AbstractionPattern::Kind): Assertion `signature || !origType->hasTypeParameter()' failed.
Please submit a bug report (https://swift.org/contributing/#reporting-bugs) and include the crash backtrace.
Stack dump:
0.	Program arguments: /usr/bin/swift-frontend -frontend -emit-module -experimental-skip-non-inlinable-function-bodies-without-types /build/swift-collections/Tests/HashTreeCollectionsTests/Colliders.swift /build/swift-collections/Tests/HashTreeCollectionsTests/Hash.swift "/build/swift-collections/Tests/HashTreeCollectionsTests/TreeDictionary Smoke Tests.swift" "/build/swift-collections/Tests/HashTreeCollectionsTests/TreeDictionary Tests.swift" "/build/swift-collections/Tests/HashTreeCollectionsTests/TreeDictionary.Keys Tests.swift" "/build/swift-collections/Tests/HashTreeCollectionsTests/TreeDictionary.Values Tests.swift" "/build/swift-collections/Tests/HashTreeCollectionsTests/TreeHashedCollections Fixtures.swift" "/build/swift-collections/Tests/HashTreeCollectionsTests/TreeSet Tests.swift" /build/swift-collections/Tests/HashTreeCollectionsTests/Utilities.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -I /build/swift-collections/.build/x86_64-unknown-linux-gnu/debug/Modules -enable-testing -g -debug-info-format=dwarf -dwarf-version=4 -module-cache-path /build/swift-collections/.build/x86_64-unknown-linux-gnu/debug/ModuleCache -swift-version 5 -Onone -D SWIFT_PACKAGE -D DEBUG -D COLLECTIONS_RANDOMIZED_TESTING -empty-abi-descriptor -Xcc -working-directory -Xcc /build/swift-collections -resource-dir /usr/lib/swift -enable-anonymous-context-mangled-names -file-compilation-dir /build/swift-collections -Xcc -fPIC -Xcc -g -Xcc -fno-omit-frame-pointer -module-name HashTreeCollectionsTests -plugin-path /usr/lib/swift/host/plugins -plugin-path /usr/local/lib/swift/host/plugins -emit-module-doc-path /build/swift-collections/.build/x86_64-unknown-linux-gnu/debug/Modules/HashTreeCollectionsTests.swiftdoc -emit-module-source-info-path /build/swift-collections/.build/x86_64-unknown-linux-gnu/debug/Modules/HashTreeCollectionsTests.swiftsourceinfo -emit-dependencies-path /build/swift-collections/.build/x86_64-unknown-linux-gnu/debug/HashTreeCollectionsTests.build/HashTreeCollectionsTests.emit-module.d -parse-as-library -o /build/swift-collections/.build/x86_64-unknown-linux-gnu/debug/Modules/HashTreeCollectionsTests.swiftmodule
1.	Swift version 6.0-dev (LLVM b3d7c45a25a792f, Swift 81534a6c151c6ed)
2.	Compiling with effective version 5.10
3.	While evaluating request ASTLoweringRequest(Lowering AST to SIL for module HashTreeCollectionsTests)
4.	While silgen emitFunction SIL function "@$s23_CollectionsTestSupport15LifetimeTrackerC08HashTreeA5TestsE19shareableDictionary_4with0fgA00gJ0VyAA0D7TrackedCy3KeyQy_GAKy5ValueQy_GG3map_SDyAnQG8expectedtx_q_tSTRzAD13DataGeneratorR_Si7ElementRtzr0_lF".
 for 'shareableDictionary(_:with:)' (at /build/swift-collections/Tests/HashTreeCollectionsTests/Utilities.swift:87:3)
Stack dump without symbol names (ensure you have llvm-symbolizer in your PATH or set the environment var `LLVM_SYMBOLIZER_PATH` to point to it):

This looks like a recent compiler regression. I'll look into it tomorrow.

@lorentey
Copy link
Member Author

@swift-ci test

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants