Skip to content

TestTarget unable to use build tool plugin to generate files #7597

@rauhul

Description

@rauhul

Is it reproducible with SwiftPM command-line tools: swift build, swift test, swift package etc?

  • Confirmed reproduction steps with SwiftPM CLI.

Description

swift-mmio fails to build with SwiftPM from main with the following error: "error: cannot find 'Banana' in scope" which is a type that should be generated by the SVD2SwiftPlugin.

Expected behavior

Build succeeds (as is the case with 5.9 and 5.10)

Actual behavior

Build fails with:

/code/Tests/SVD2SwiftPluginTests/SVD2SwiftTests.swift:17:5: error: cannot find 'Banana' in scope
15 |   // swift-format-ignore: AlwaysUseLowerCamelCase
16 |   func _do_not_run() {
17 |     Banana.timer1.cr.modify { _, _ in }
   |     `- error: cannot find 'Banana' in scope
18 |   }

Steps to reproduce

swift test with swift-mmio @ 822f5e231dacb686030437ef18654d586a1575c6

Swift Package Manager version/commit hash

main

Swift & OS version (output of swift --version ; uname -a)

Swift version 6.0-dev (LLVM cef183591317ec7, Swift 66e311074bff491)
Target: aarch64-unknown-linux-gnu
Linux b1edcdcd4c95 6.1.68 #1 SMP Thu May  2 02:50:09 UTC 2024 aarch64 aarch64 aarch64 GNU/Linux

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions