Skip to content

Fix bug in TextLoader #3056

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

Merged
merged 1 commit into from
Mar 22, 2019
Merged

Fix bug in TextLoader #3056

merged 1 commit into from
Mar 22, 2019

Conversation

yaeldekel
Copy link

Fixes #2996. (This PR replaces #3011).

@yaeldekel yaeldekel requested review from TomFinley and sfilipi March 21, 2019 21:43
if (info.Type != typeof(ILegacyDataLoader) || info.ArgType != typeof(Options))
// Make sure that the schema is described using either the syntax TextLoader{<settings>} or the syntax Text{<settings>},
// where "settings" is a string that can be parsed by CmdParser into an object of type TextLoader.Options.
if (loader == null || string.IsNullOrWhiteSpace(loader.Name) || (loader.Name != LoaderSignature && loader.Name != "Text"))
Copy link
Author

Choose a reason for hiding this comment

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

Name [](start = 88, length = 4)

The previous check was to verify that loader.Name is one of the names defined in TextLoader's LoadableClassAttribute. Since now we cannot rely on this attribute being in the ComponentCatalog, we explicitly require loader.Name to be one of the load names of TextLoader.

Copy link
Member

@sfilipi sfilipi left a comment

Choose a reason for hiding this comment

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

:shipit:

Copy link
Contributor

@TomFinley TomFinley left a comment

Choose a reason for hiding this comment

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

Thank you @yaeldekel !

@TomFinley TomFinley merged commit 9dfaa38 into dotnet:master Mar 22, 2019
@yaeldekel yaeldekel deleted the embeddedschema branch March 22, 2019 19:01
@ghost ghost locked as resolved and limited conversation to collaborators Mar 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants