Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix: Trim Unicode NULL character for Windows support #420
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
Fix: Trim Unicode NULL character for Windows support #420
Changes from all commits
69541b2
a2b8218
03a041e
3c53608
109e5bc
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This block is guarded by either
release
ordist
being empty on options. But below we only take therelease
built in here, ifoptions.release
is not empty, we just use that, and same fordist
.So if only
options.release
is set, we'll build a new release (as per this block) but won't use it at all.Would it make sense to check if
+
exists and append thebuildNumber
we detected in that case?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the
??
does the job if I got what you meant egoptions.release = options.release ?? release;
but what we could do is to actually check if we need to build the
release
ordist
only and not execute code that is not necessary, eg, building a newrelease
if we're going to use theoptions.release
anyway as its not emptyThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah it's already using options.release if it's already set, it's just odd that we build a new release value even though it's not used.
And I was trying to think of ways to combine what we built in the block with what was defined but best not mess around with a value that was explicitly set by the user on options.
So the only improvement here is as you said just to avoid doing the work if not needed though it'll make the logic more complicated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to be sure that this works on Windows, maybe @bruno-garcia can test it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I dream of integration test on the target platform that will validate these for us. Mainly because of regressions introduced later.
Thoughts? Q2 is the time to plan and book these tasks
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is wrong, in this case, if there's no
version
, it should besentry_flutter_example@123
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll confirm that, let's keep as it is for now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is actually not going to happen because pubspec must have a
version
or it defaults to 0.0.0 https://dart.dev/tools/pub/pubspec#versionits only possible because we've mocked the values, so no special anything case here.