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

Prerequisites for versioning. #156

Merged
merged 6 commits into from
Oct 16, 2019
Merged

Prerequisites for versioning. #156

merged 6 commits into from
Oct 16, 2019

Conversation

simeoncran
Copy link
Contributor

This adds a number of pieces required to generate version-adaptive code, but doesn't
yet hook those pieces up. This allows testing against a corpus to ensure nothing is
broken. A future commit will add version-adaptivity.

This adds a number of pieces required to generate version-adaptive code, but doesn't
yet hook those pieces up. This allows testing against a corpus to ensure nothing is
broken. A future commit will add version-adaptivity.
{
if (!uint.TryParse(arg, out var version))
{
ErrorDescription = "minimum UAP version must be an positive integer";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

minimum UAP version must be an positive integer [](start = 48, length = 47)

Nit: Is this the established format for these? (First word not capitalized and no ending period) If you had the capitalization and period then you could more easily have them on the same line in the future if needed? #Closed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to make it more consistent, and got it half right. Will do what you suggest (capitalized and ending period). Note that we only output the first error during parsing of the command line anyway.


In reply to: 335220830 [](ancestors = 335220830)

@@ -67,6 +67,28 @@ RunResult Run()
_reporter.ErrorStream.WriteLine(_options.ErrorDescription);
return RunResult.InvalidUsage;
}
else if (_options.MinimumUapVersion.HasValue && _options.MinimumUapVersion < 7)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

7 [](start = 85, length = 1)

In your next pass at versioning I assume you will define this 7 somewhere global and give it a good description and such. #Closed

else if (_options.MinimumUapVersion.HasValue && _options.MinimumUapVersion < 7)
{
// Unacceptable version.
_reporter.WriteError("Minimum UAP version must be 7 or above.");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

_reporter.WriteError("Minimum UAP version must be 7 or above."); [](start = 12, length = 64)

Nit: maybe these error messages could say the version that was passed in. This would help for the scenarios where one person wrote the LottieGen automation script and another person needs to figure out later why things are broken. #Closed

or higher and >= MinimumUapVersion. Code will be generated
that may take advantage of features in this version in order
to produce a better result. If not specified, defaults to
the latest UAP version.
Copy link
Contributor

@eliezerpMS eliezerpMS Oct 15, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the latest UAP version. [](start = 23, length = 23)

Do you mean the newest UAP version the OS supports or the newest version on the newest released version of the OS? #WontFix

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discussed in person. The default acts as if you had specified the latest published version of the UAP contract. That doesn't mean that LottieGen knows about that latest version... it currently only knows up to version 8. But when 9 gets released, specifying 9 here would produce code that uses features in version 8, which is also what happens if you rely on the default.
I don't think we can make this clearer while keeping it concise, and I'm guessing it is ok as is.


In reply to: 335223414 [](ancestors = 335223414)

Simeon Cran added 3 commits October 15, 2019 16:47
I meant to fix this but must have forgotten. It was a byproduct of some experimentation.
internal CompositionGeometricClip CreateGeometricClip()
{
return _compositor.CreateGeometricClip();
}
Copy link
Contributor

@eliezerpMS eliezerpMS Oct 16, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this one be switched back as well? #Resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes.


In reply to: 335240886 [](ancestors = 335240886)

Copy link
Contributor

@eliezerpMS eliezerpMS left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@simeoncran simeoncran changed the title Work in progress towards versioning. Prerequisites for versioning. Oct 16, 2019
@simeoncran simeoncran merged commit bce52d5 into master Oct 16, 2019
@delete-merged-branch delete-merged-branch bot deleted the Versioning branch October 16, 2019 22:32
@michael-hawker michael-hawker added this to the 6.0 milestone Nov 13, 2019
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

Successfully merging this pull request may close these issues.

None yet

3 participants