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

overly aggressive restriction on bundle identifiers restricts my idiom #1212

Closed
glyph opened this issue Apr 24, 2023 · 12 comments · Fixed by #1819 or #1824
Closed

overly aggressive restriction on bundle identifiers restricts my idiom #1212

glyph opened this issue Apr 24, 2023 · 12 comments · Fixed by #1819 or #1824
Labels
bug A crash or error in behavior.

Comments

@glyph
Copy link

glyph commented Apr 24, 2023

Describe the bug

All my apps have bundle IDs of the form im.glyph.and.this.is.<app name> but that doesn't work with briefcase new, due to this error:

Bundle Identifier [com.example]: im.glyph.and.this.is.examplecase

Invalid value; 'im.glyph.and.this.is.examplecase' is not a valid bundle identifier.

The bundle should be a reversed domain name. It must contain at least 2
dot-separated sections; each section may only include letters, numbers,
and hyphens; and each section may not contain any reserved words (like
'switch', or 'while').

Steps to reproduce

Just run briefcase new and use the aforementioned bundle id.

Expected behavior

It accepts the input.

Screenshots

No response

Environment

  • Operating System: ```
    ProductName: macOS
    ProductVersion: 13.3.1
    BuildVersion: 22E261
- Python version: Python 3.11.3
- Software versions:
  - Briefcase: 0.3.14


### Logs



### Additional context

_No response_
@glyph glyph added the bug A crash or error in behavior. label Apr 24, 2023
@freakboy3742
Copy link
Member

This seems like over-enthusiastic validation catching the and, is, and this keywords.

We need to confirm the exact validation scheme that is being used on bundle IDs. We added keywords to the list because of complications with Java namespaces on Android (specifically the switch keyword, IIRC).

@Cimbali
Copy link
Contributor

Cimbali commented Aug 22, 2023

It seems io falls into this as well. where https://${project}.github.io/ are often used for project github pages, which makes io.github.${project} a natural candidate for bundle identifier. It seems to be prohibited because io is a python package, but I’m not sure under what circumstances python packages and bundle identifiers could be confused?

@freakboy3742
Copy link
Member

@Cimbali Thanks for the heads up on that one - definitely looks like we should relax the validation for the parts the bundle identifier. We're currently doing the same validation on each individual part of the bundle identifier, mostly out of simplicity than out of any specific concern. Clearly we are able to relax the name checks on all but the last token (which is the app name, and is therefore critical that it doesn't collide).

@mas192
Copy link
Contributor

mas192 commented May 20, 2024

bundle application identifiers restrict ca (Canada) too.
ca_domain_valiation_bug_2024-05-20 06-34-15

@mhsmith
Copy link
Member

mhsmith commented May 21, 2024

In this case I think it's test rather than ca, because test is the standard library's self-test module. However, as mentioned above, this check should only be done on the app's Python package name, not every element in the bundle ID.

@mas192
Copy link
Contributor

mas192 commented May 21, 2024

I have requested a PR to address this issue
#1824

@freakboy3742
Copy link
Member

This wasn't actually fixed by #1819 - the text of PR comment triggered Github's auto closer.

@freakboy3742 freakboy3742 reopened this May 22, 2024
@glyph
Copy link
Author

glyph commented May 22, 2024

Aww. Well thanks for the work regardless :)

@freakboy3742
Copy link
Member

@glyph Oh - there's a fix about to land - just waiting for CI.

@glyph
Copy link
Author

glyph commented May 22, 2024

Yay again!

@glyph
Copy link
Author

glyph commented May 23, 2024

Hooray… for real?

@freakboy3742
Copy link
Member

@glyph Yes, you may now celebrate 😀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A crash or error in behavior.
Projects
None yet
5 participants