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

Introduce version range checking #2199

Closed
wants to merge 1 commit into from

Conversation

paulcam206
Copy link
Member

Part of work needed for #2019 in shared model -- introduce version range/wildcard support a la NuGet.

Max // must always be last
};

// Indicates if a SemanticVersion instance supports wildcards. We could use a bool here, but it complicates the
Copy link
Contributor

Choose a reason for hiding this comment

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

Indicates if a SemanticVersion instance supports wildcards [](start = 7, length = 58)

In what scenarios do we support wildcards vs not supporting them?

Copy link
Member Author

Choose a reason for hiding this comment

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

wildcards are allowed in "requires" statements, but not as a version specification in a card


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

Max // must always be last
};

// Indicates if a SemanticVersion instance supports wildcards. We could use a bool here, but it complicates the
Copy link
Contributor

Choose a reason for hiding this comment

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

complicates [](start = 100, length = 11)

For my own information, what's the complication?

Copy link
Member Author

Choose a reason for hiding this comment

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

vacation's a bear -- I can't speak to this as cogently as I could've a month ago :)

IIRC, it had something to do with implicit bool casts for overloaded ctors:

class MyClass
{
public:
    MyClass(bool doThing) { std::cout << "bool ctor\n"; }
    MyClass(const std::string& inputString) { std::cout << "string ctor\n"; }
};

int main()
{
    auto instance = MyClass("whee!");
}

which yields the surprising result:

> bool ctor


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

{
return false;
}
else if (lhsVersion == rhsVersion)
Copy link
Contributor

Choose a reason for hiding this comment

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

lhsVersion == rhsVersion [](start = 21, length = 24)

Make this a != and remove the empty clause?

@paulcam206
Copy link
Member Author

This work, sadly, is now moot after a spec change.

@paulcam206 paulcam206 closed this Jan 3, 2019
@paulcam206 paulcam206 deleted the paulcam/version-conditional branch January 3, 2019 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants