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

Can't import AppMetrica 5.0.0+: Error in fail: in attribute 'name': this attribute has unsupported character '/' #1026

Open
krypt-lx opened this issue Apr 20, 2024 · 2 comments

Comments

@krypt-lx
Copy link
Contributor

Apparently, for target AppMetricaCrashes of AppMetrica rspm generates invalid names for rules:

ERROR: /private/var/tmp/_bazel_krypt/de9844abaa047ea4e0868fa95089f211/external/rules_swift_package_manager~0.29.2~swift_deps~swiftpkg_kscrash/BUILD.bazel:238:13: in objc_library rule @rules_swift_package_manager~0.29.2~swift_deps~swiftpkg_kscrash//:KSCrash/Installations.rspm: 
Traceback (most recent call last):
	File "/virtual_builtins_bzl/common/objc/objc_library.bzl", line 39, column 25, in _objc_library_impl
	File "/virtual_builtins_bzl/common/objc/objc_library.bzl", line 34, column 25, in _validate_attributes
	File "/virtual_builtins_bzl/common/objc/objc_library.bzl", line 30, column 9, in _attribute_error
Error in fail: in attribute 'name': this attribute has unsupported character '/'
ERROR: /private/var/tmp/_bazel_krypt/de9844abaa047ea4e0868fa95089f211/external/rules_swift_package_manager~0.29.2~swift_deps~swiftpkg_kscrash/BUILD.bazel:238:13: Analysis of target '@rules_swift_package_manager~0.29.2~swift_deps~swiftpkg_kscrash//:KSCrash/Installations.rspm' failed

The BUILD.bazel, indeed, contains a name with "/" in it:

objc_library(
    name = "KSCrash/Installations.rspm",
    copts = [

There are more such names in this file, so, attaching it:
BUILD.bazel.txt

The line I'm using to import the package:

        .package(url: "https://github.com/appmetrica/appmetrica-sdk-ios", from: "5.2.0"),

it has multiple public targets inside, including AppMetricaCrashes

@cgrindel
Copy link
Owner

@krypt-lx Can you provide a repro with the failure? Perhaps, add it to an existing example and create a draft PR?

@krypt-lx
Copy link
Contributor Author

Will create an example project, once I have the time

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

No branches or pull requests

2 participants