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

Adds more tests around the macros for trait edge cases and others #1725

Merged
merged 6 commits into from
Sep 26, 2017

Conversation

ianoc-stripe
Copy link
Contributor

This should fail in CI, will follow up with code changes to remove warnings and fix these tests.

@ianoc
Copy link
Collaborator

ianoc commented Sep 25, 2017

Does a bunch of damage on #1721 but there's more warnings, some of which the linter fires in generated code, not too sure how to stop that even....

@johnynek As you requested :)

(Also included is failing test + bug fix for some trait handling for classes with lots of fields failing to deserialize. And some better escape hatch handling so users can supply their own OrderedSerializations when the macros fail more often).

implicit def ordSer[T]: OrderedSerialization[T] = macro com.twitter.scalding.serialization.macros.impl.OrderedSerializationProviderImpl[T]
}

object BinaryOrdering extends BinaryOrdering {}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think you need {}

Copy link
Collaborator

@johnynek johnynek left a comment

Choose a reason for hiding this comment

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

Thanks for removing the curlies!

.collect { case m: MethodSymbol => m }
.filter(m => m.name.toString.startsWith("_"))
.filter(m => m.name.toTermName.toString.startsWith("_"))
Copy link
Collaborator

Choose a reason for hiding this comment

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

I had to remove a bunch of these since they were calling toTermName on things that were already TermName, but I guess with blackbox this changed?

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 suspect i've glossed over some of those warnings migrating in bulk the code with the fixes in it. I'll do a clean compile or two to make sure i've not added new warnings.

@ianoc-stripe
Copy link
Contributor Author

Ok i think that should be better minus those few fixes.

There are a bunch of warnings about unreachable code in match statements, though they seem spurrious. I've added a sys.error into one of them and it fires...

@johnynek
Copy link
Collaborator

I'm merging as is and we can deal with the blackbox issue in a follow up (I would love to get the warnings cleaned up in scalding).

@johnynek johnynek merged commit 7faec33 into twitter:develop Sep 26, 2017
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.

3 participants