Skip to content

Work around PackageInfo Limitations #410

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

Closed
ueman opened this issue Apr 8, 2021 · 10 comments
Closed

Work around PackageInfo Limitations #410

ueman opened this issue Apr 8, 2021 · 10 comments

Comments

@ueman
Copy link
Collaborator

ueman commented Apr 8, 2021

Linux und Windows have a few limitations. Notably:

  • Linux has no package name
  • Windows has an empty distribution

We need to figure out what a sensible default value is, if we can not work around those limitations.

@marandaneto
Copy link
Contributor

marandaneto commented Apr 8, 2021

Current linux release: @0.1.2+3
Current windows release: sentry_flutter_example\[email protected]\u0000+ -> https://www.fileformat.info/info/unicode/char/0000/index.htm

@marandaneto
Copy link
Contributor

macOS does it nicely [email protected]+3

@marandaneto
Copy link
Contributor

marandaneto commented Apr 8, 2021

@marandaneto
Copy link
Contributor

linux issue fluttercommunity/plus_plugins#203

@ueman
Copy link
Collaborator Author

ueman commented Apr 12, 2021

@marandaneto
Copy link
Contributor

marandaneto commented Apr 12, 2021

@ueman sounds a good idea
there are a few chars not allowed chars though, https://docs.sentry.io/platforms/flutter/configuration/releases/#bind-the-version
packageName does not allow such chars, so we have not used a regex or so, maybe with App's name this might be necessary.

@ueman
Copy link
Collaborator Author

ueman commented Apr 12, 2021

On web and linux and windows the name given in the pubspec.yaml gets used as appName: https://dart.dev/tools/pub/pubspec#name

I'm not sure though about windows and what UWP uses though.

@ueman ueman self-assigned this Apr 13, 2021
@marandaneto
Copy link
Contributor

to close this issue I suggest the following:

take the Windows example:

sentry_flutter_example\[email protected]\u0000+

trim null chars \u0000;
only concat + if the buildNumber is non-empty;

result should be: [email protected]

other than that, on Windows support, we should document that the release should be set by either options.release or SENTRY_RELEASE env. var.

@ueman
Copy link
Collaborator Author

ueman commented Apr 15, 2021

Do we want to do

trim null chars \u0000;

ourself or do we fix it in package_info_plus?

@marandaneto
Copy link
Contributor

@ueman we can't control user's package_info_plus version, so we have to trim ourselves, I believe, otherwise we'd force people to a min. version which is the latest and might not be what they want.

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

No branches or pull requests

2 participants