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

PiranhaJava // config: add returnType, receiverType and argumentIndex; move to properties.json #39

Merged
merged 11 commits into from Jun 15, 2020

Conversation

pranavsb
Copy link
Contributor

@pranavsb pranavsb commented May 24, 2020

This is an enhancement and a fix for #38 and #6 .
The config file is moved to properties.json, removing the necessity for piranha.properties.

Return type and receiver type regexes can be specified in properties.json corresponding to the flagType and methodName. Argument index to check against xpFlagName can also be specified. All 3 are optional fields.

Please see TODO in XPFlagCleanerTest. I have changed getXPAPI to return API.UNKNOWN if the specified method's receiver or return type don't match what is specified in properties.json, but I think there is some change required in some other part of the code.
UPDATE: Have raised #40 for any further discussion related to this.

NOTE: Argument index is not yet implemented, so #6 is still open.

@CLAassistant
Copy link

CLAassistant commented May 24, 2020

CLA assistant check
All committers have signed the CLA.

@pranavsb pranavsb changed the title config: add returnType and receiverType; move to properties.json PiranhaJava // config: add returnType and receiverType; move to properties.json May 24, 2020
Copy link
Contributor

@mkr-plse mkr-plse 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 an excellent enhancement PR. Overall, looks great.
Can you clarify some of the questions raised in the review?

java/README.md Outdated Show resolved Hide resolved
java/piranha/config/properties.json Outdated Show resolved Hide resolved
@pranavsb
Copy link
Contributor Author

pranavsb commented May 26, 2020

Thanks for an excellent enhancement PR. Overall, looks great.
Can you clarify some of the questions raised in the review?

Thank you. I've replied to your comments and added one of my own.

Will change:

  1. all maps to one map - for holding config data
  2. null to ...

Copy link
Contributor

@lazaroclapp lazaroclapp left a comment

Choose a reason for hiding this comment

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

This is an amazing contribution overall. I did a first pass of commenting. Basically, I'd like to have some more structure to our fields than just one gigantic map encoding the full JSON, and also have some decoupling between config format and in-memory representation (so we can keep supporting .properties for existing users), other than that, it's mostly nits. @mkr-plse , what do you think?

@pranavsb
Copy link
Contributor Author

@mkr-plse @lazaroclapp

All good points, will get back to this over the weekend and wrap it up.

Wanted to bring one thing to your attention though.
I think some gradle changes are required to ensure that json jar is contained within the piranha jar generated by gradle jar. I tried copying the 0.0.4-SNAPSHOT jar to my local maven repository and compiled a dummy springboot project and got this error. Used to compile and have in place piranha updates before.

Error: An unhandled exception was thrown by the Error Prone static analysis plugin.
[ERROR] Please report this at https://github.com/google/error-prone/issues/new and include the following:
[ERROR]
[ERROR] error-prone version: 2.3.4
[ERROR] BugPattern: Piranha
[ERROR] Stack Trace:
[ERROR] java.lang.NoClassDefFoundError: org/json/simple/parser/JSONParser
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]

@lazaroclapp
Copy link
Contributor

@mkr-plse @lazaroclapp

All good points, will get back to this over the weekend and wrap it up.

Wanted to bring one thing to your attention though.
I think some gradle changes are required to ensure that json jar is contained within the piranha jar generated by gradle jar. I tried copying the 0.0.4-SNAPSHOT jar to my local maven repository and compiled a dummy springboot project and got this error. Used to compile and have in place piranha updates before.

Error: An unhandled exception was thrown by the Error Prone static analysis plugin.
[ERROR] Please report this at https://github.com/google/error-prone/issues/new and include the following:
[ERROR]
[ERROR] error-prone version: 2.3.4
[ERROR] BugPattern: Piranha
[ERROR] Stack Trace:
[ERROR] java.lang.NoClassDefFoundError: org/json/simple/parser/JSONParser
[ERROR] -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]

How are you bringing in Piranha? Are you making it a dependency for your project? (If so, I believe the build system would grab its dependencies from maven central) Or are you just sticking the jar somewhere? (Piranha is not supposed to be a fat jar, afaik)

Note that the sample projects in this repo build by simply depending on Piranha and we'd be sure to test this with our internal (buck) build system before cutting a release.

What happens if you replace -SNAPSHOT with .1-LOCAL, do ./gradlew install (on the java/ directory) then import in your project from the local maven cache?

@pranavsb
Copy link
Contributor Author

How are you bringing in Piranha? Are you making it a dependency for your project? (If so, I believe the build system would grab its dependencies from maven central) Or are you just sticking the jar somewhere? (Piranha is not supposed to be a fat jar, afaik)

Yes, Piranha is added as a dependency. Basically the same POM config that's given in the Java README. I figured out that adding json-simple to annotationProcessorPaths (that already contains piranha and errorprone) works.

Note that the sample projects in this repo build by simply depending on Piranha and we'd be sure to test this with our internal (buck) build system before cutting a release.

👍

What happens if you replace -SNAPSHOT with .1-LOCAL, do ./gradlew install (on the java/ directory) then import in your project from the local maven cache?

This works too! Must have been some issue on my end.

@lazaroclapp
Copy link
Contributor

How are you bringing in Piranha? Are you making it a dependency for your project? (If so, I believe the build system would grab its dependencies from maven central) Or are you just sticking the jar somewhere? (Piranha is not supposed to be a fat jar, afaik)

Yes, Piranha is added as a dependency. Basically the same POM config that's given in the Java README. I figured out that adding json-simple to annotationProcessorPaths (that already contains piranha and errorprone) works.

Note that the sample projects in this repo build by simply depending on Piranha and we'd be sure to test this with our internal (buck) build system before cutting a release.

👍

What happens if you replace -SNAPSHOT with .1-LOCAL, do ./gradlew install (on the java/ directory) then import in your project from the local maven cache?

This works too! Must have been some issue on my end.

I think what is happening is, because you are moving the SNAPSHOT jar around, it was trying to use Piranha after this patch but only fetching the dependencies of the latest Piranha release, which doesn't include json-simple (you shouldn't need to add it to annotationProcessorPaths once this PR becomes part of mainline Piranha, and I should test that that is true before cutting a release :) )

@pranavsb
Copy link
Contributor Author

pranavsb commented Jun 2, 2020

Have updated the PR with support for argumentIndex.

This closes #6

Anything else remaining?
Not sure about the testcases with //BUG:
They pass for me, with and without the line, though I see from the code that maybe that's not supposed to happen.

Update: the README should be updated to mention the optional argumentIndex. I will do that.

@lazaroclapp
Copy link
Contributor

Anything else remaining?
Not sure about the testcases with //BUG:
They pass for me, with and without the line, though I see from the code that maybe that's not supposed to happen.

Haven't done the full review yet, but two things:

  1. Let's remove the //BUG: lines on the new refactoring test cases (no need to change the existing ones), if they aren't being checked. As long as we are checking input and output code, it should be good. Does that make sense to you as well, @mkr-plse ?
  2. Please git pull to rebase atop master and resolve the conflicts with other recent PRs.

Copy link
Contributor

@mkr-plse mkr-plse left a comment

Choose a reason for hiding this comment

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

Thanks @pranavsb for the PR again. The changes are looking good. Left a few comments and will review the tests after the comments are addressed.

java/README.md Outdated Show resolved Hide resolved
java/piranha/config/properties.json Outdated Show resolved Hide resolved
@mkr-plse
Copy link
Contributor

mkr-plse commented Jun 2, 2020

  1. Let's remove the //BUG: lines on the new refactoring test cases (no need to change the existing ones), if they aren't being checked. As long as we are checking input and output code, it should be good. Does that make sense to you as well, @mkr-plse ?

Agree.

@pranavsb pranavsb changed the title PiranhaJava // config: add returnType and receiverType; move to properties.json PiranhaJava // config: add returnType, receiverType and argumentIndex; move to properties.json Jun 3, 2020
Moved from defaultCharset to StandardCharsets.UTF_8 for reading
properties.json
@pranavsb pranavsb force-pushed the pranav_add_properties_json_2 branch from 47ffe00 to c89c433 Compare June 4, 2020 10:30
@pranavsb
Copy link
Contributor Author

pranavsb commented Jun 4, 2020

Let's remove the //BUG: lines on the new refactoring test cases
Please git pull to rebase atop master and resolve the conflicts with other recent PRs.

Done!

I also closed almost all review comments. Have left a few open in case there's further discussion required.

One thing worth noting, I've changed the Files.newBufferedReader that reads properties.json to use StandardCharsets.UTF_8 instead of the Charset.defaultCharset() call earlier.

Copy link
Contributor

@mkr-plse mkr-plse 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 the changes. Left a few more comments, but at the high level, these are the main issues:
a) We can get rid of the pattern for receiverType and returnType and simplify the code
b) We can change the return type of checkValue... to the appropriate Object. Will avoid redundant get calls.
c) The tests may need to be enhanced to check for a few more combinations. Some cases that I can think of:

  • when the required properties are not provided in the json,
  • when receiverType alone is specified
  • when returnType alone is specified
  • when argumentIndex alone is specified
  • when argumentIndex and receiverType are specified
  • when argumentIndex and returnType are specified
  • when all the three are specified
  • for each of the above cases, there are likely two tests -- with or without method matching in the input source

java/piranha/config/properties.json Outdated Show resolved Hide resolved
java/README.md Outdated Show resolved Hide resolved
@pranavsb
Copy link
Contributor Author

pranavsb commented Jun 5, 2020

Thanks for the changes. Left a few more comments, but at the high level, these are the main issues:
a) We can get rid of the pattern for receiverType and returnType and simplify the code

Done.

b) We can change the return type of checkValue... to the appropriate Object. Will avoid redundant get calls.

Done.

c) The tests may need to be enhanced to check for a few more combinations. Some cases that I can think of:

for each of the above below cases, there are likely two tests -- with or without method matching in the input source

Testcases

  • when the required properties are not provided in the json,
  • when receiverType alone is specified
  • when returnType alone is specified
  • when argumentIndex alone is specified
    For above 3, there's already properties_test_return, properties_test_receive and properties_test_argument. These files have methodName and flagType and one of the optional fields. But they test the no flag case. Will add similar checks with flag specified.
  • when argumentIndex and receiverType are specified
  • when argumentIndex and returnType are specified
  • when all the three are specified

Also, I've changed the init method in XPFlagCleaner from private to default (package-private), for better testing, hope that's okay.

@mkr-plse
Copy link
Contributor

mkr-plse commented Jun 5, 2020

Thanks for the changes. Left a few more comments, but at the high level, these are the main issues:
a) We can get rid of the pattern for receiverType and returnType and simplify the code

Done.

@pranavsb Can you push your changes? It looks like the files have not been updated yet.

@pranavsb
Copy link
Contributor Author

pranavsb commented Jun 5, 2020

Thanks for the changes. Left a few more comments, but at the high level, these are the main issues:
a) We can get rid of the pattern for receiverType and returnType and simplify the code

Done.

@pranavsb Can you push your changes? It looks like the files have not been updated yet.

Was planning to finish tests before pushing. Have added a few.
Let me push for now. Pushed.

@mkr-plse
Copy link
Contributor

mkr-plse commented Jun 5, 2020

Was planning to finish tests before pushing. Have added a few.
Let me push for now. Pushed.

I thought you forgot to push because of the done comment. No hurry. Let me know when the code is available for review again.

@pranavsb
Copy link
Contributor Author

pranavsb commented Jun 6, 2020

Added (lots of) tests and pushed. Guess it's in decent shape now.

Copy link
Contributor

@mkr-plse mkr-plse left a comment

Choose a reason for hiding this comment

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

Changes look great. The elaborate tests and the comments accompanying them are very helpful. Thanks for the painstaking effort.

There are a couple of comments. It will be great if you can address them. We can merge the changes after @lazaroclapp also takes a look at the changes.

java/README.md Outdated

The `emptyMethods` specify the APIs which need to be discarded from the code. For example, a statement `enableFlag(SAMPLE_STALE_FLAG);` will be deleted from the code.
For `returnType` and `receiverType`, types should be written as `boolean` or `void` for inbuilt types, and fully qualified for custom defined types. eg: `com.uber.piranha.XPFlagCleanerPositiveCases.XPTest`
Copy link
Contributor

Choose a reason for hiding this comment

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

inbuilt -> primitive.

Copy link
Contributor

Choose a reason for hiding this comment

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

Also, question as a user reading this: what about String? Is it string or java.lang.String? (I'd assume the second, specially if we say "primitive" but might be worth calling it out explicitly.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also added java.lang.string and a java.lang.boolean (which returns Boolean instead of boolean) test

Copy link
Contributor

@lazaroclapp lazaroclapp left a comment

Choose a reason for hiding this comment

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

Overall, really happy with this version. There is a comment under noFlagCase that I probably want some more clarity on before landing.

The rest, I think, are mostly nits and minor fixes.

java/README.md Outdated Show resolved Hide resolved
java/README.md Outdated Show resolved Hide resolved
java/README.md Outdated Show resolved Hide resolved
java/README.md Outdated

The `emptyMethods` specify the APIs which need to be discarded from the code. For example, a statement `enableFlag(SAMPLE_STALE_FLAG);` will be deleted from the code.
For `returnType` and `receiverType`, types should be written as `boolean` or `void` for inbuilt types, and fully qualified for custom defined types. eg: `com.uber.piranha.XPFlagCleanerPositiveCases.XPTest`
Copy link
Contributor

Choose a reason for hiding this comment

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

Also, question as a user reading this: what about String? Is it string or java.lang.String? (I'd assume the second, specially if we say "primitive" but might be worth calling it out explicitly.

java/piranha/config/properties.json Outdated Show resolved Hide resolved
* Methods with no arguments are simplified, provided argumentIndex is not specified
* (assuming that returnType and receiverType - if specified - are a match)
* Uses "properties_test_noFlag.json" as the config file.
* Note that "Piranha:FlagName" is not considered when argumentIndex is not specified.
Copy link
Contributor

Choose a reason for hiding this comment

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

Out of curiosity: will this work only for versions of the method that take zero args?

My worry here is that a misconfiguration, where Piranha:FlagName is empty, and the argumentIndex is missing, it will go and delete half the code. We probably don't want that behavior. @Murali ??

Copy link
Contributor

Choose a reason for hiding this comment

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

I think we'd want any code that would delete experimentation.isToggleEnabled(SOME_FLAG) { ... } for every possible value of SOME_FLAG at once to error out by default. If someone really needs to do this, we can add a Piranha:AllowMassRemoval=true argument or something. It just feels like the kind of thing that might scare new users from trying piranha if they don't configure it right.

Unless I am mistaken and this case will only delete treatment methods with zero args.

Copy link
Contributor

Choose a reason for hiding this comment

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

My understanding is that this will only delete methods listed in the properties.json without checking for flagname in argument. At worst, this will delete all calls to an API if the argumentIndex is not specified. Your point on getting the configuration right is valid too.

Let us leave this functionality as it is in the current version of the PR and if it becomes a source of confusion, let us revisit this.

Copy link
Contributor

Choose a reason for hiding this comment

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

I feel that worst case scenario is really really bad. Consider the effects of trying out Piranha in Uber's monorepos under those conditions, it would locally rewrite maybe hundreds of thousands of lines of code... and scare many people from ever trying it again.

I am fine with that check being a follow-up task, but I'd want to have it in place before we cut any release with this (it's already tricky enough that we are switching the config file format)

Copy link
Contributor

Choose a reason for hiding this comment

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

Also for a follow up task (I can do it): Print a message whenever the config points to a file ending in .properties explaining the format change and linking the docs in case someone is just upgrading Piranha.

Copy link
Contributor

Choose a reason for hiding this comment

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

How about this:
a) By default, argumentIndex is a required parameter in json.
b) Using a configuration option (as you point above), this can be made optional.

(a) will be good for most users and in cases, where a user wants to delete all calls to the API, (b) can be used.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yup. That's exactly what I'd want. And we can add (a) to this PR and make (b) a follow up, to make this easier to land. But I'd rather have that small guardrail there than the extra functionality of deleting methods without arguments 😄

Copy link
Contributor

Choose a reason for hiding this comment

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

^ @pranavsb Everything else is a nit and could be done later, but I'd like this one change before landing:

a) By default, argumentIndex is a required parameter in json.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Also for a follow up task (I can do it): Print a message whenever the config points to a file ending in .properties explaining the format change and linking the docs in case someone is just upgrading Piranha.

Raised #49 for this. Clearly, I have issues :P

"class XPFlagCleanerSinglePositiveCase {",
" private XPTest experimentation;",
" public String evaluate() {",
" if (experimentation.isToggleEnabled()) { int a = 1; }",
Copy link
Contributor

Choose a reason for hiding this comment

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

What does this code do about experimentation.isToggleEnabled(SOME_FLAG) { ... }?

Copy link
Contributor Author

@pranavsb pranavsb Jun 13, 2020

Choose a reason for hiding this comment

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

As you know by now, argumentIndex not being specified would lead to all occurrences of isToggleEnabled being removed, irrespective of its argument(s) count/value.

I'm in the process of adding ArgumentIndexOptional Piranha argument to fix this

Copy link
Contributor

@lazaroclapp lazaroclapp left a comment

Choose a reason for hiding this comment

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

Mostly just the not allowing index to be missing change (see discussion above). You don't need to add the option to re-enable the empty index mode, and you can decide whether or not to address the other nits, but this one is kinda important :/

@pranavsb
Copy link
Contributor Author

pranavsb commented Jun 9, 2020

Mostly just the not allowing index to be missing change (see discussion above). You don't need to add the option to re-enable the empty index mode, and you can decide whether or not to address the other nits, but this one is kinda important :/

Alright I see your point about the mass deletion being confusing for new users.
But if I make argumentIndex mandatory and not implement "enable empty index", Piranha would no longer work for my codebase :/

How about I make argumentIndex mandatory, but it allows values from -1,0,1...?
-1 would correspond to the noFlagCase, that is, a toggle method that takes no arguments.
Later, the Piranha options can be modified and argumentIndex can go back to being 0 upwards if needed.

P.S. I'll need a few days before starting on this, but I'll be happy to work on the nits too. Let me know if you catch anything else. :)

@mkr-plse
Copy link
Contributor

mkr-plse commented Jun 9, 2020

Mostly just the not allowing index to be missing change (see discussion above). You don't need to add the option to re-enable the empty index mode, and you can decide whether or not to address the other nits, but this one is kinda important :/

Alright I see your point about the mass deletion being confusing for new users.
But if I make argumentIndex mandatory and not implement "enable empty index", Piranha would no longer work for my codebase :/

How about I make argumentIndex mandatory, but it allows values from -1,0,1...?
-1 would correspond to the noFlagCase, that is, a toggle method that takes no arguments.

Instead of -1, see the suggestion here which references this. We can add an option ArgumentIndexOptional to Piranha and it will be false by default. This will avoid the confusion related to misconfiguration. For your codebase (and similar scenarios), the option can be set to true when Piranha is invoked.

By adding this option, you can also leave most of the noFlagTestCases as is and simply update the configuration options passed to the tests.

P.S. I'll need a few days before starting on this, but I'll be happy to work on the nits too. Let me know if you catch anything else. :)

@pranavsb
Copy link
Contributor Author

pranavsb commented Jun 9, 2020

Instead of -1, see the suggestion here which references this. We can add an option ArgumentIndexOptional to Piranha and it will be false by default. This will avoid the confusion related to misconfiguration. For your codebase (and similar scenarios), the option can be set to true when Piranha is invoked.

By adding this option, you can also leave most of the noFlagTestCases as is and simply update the configuration options passed to the tests.

Yes, that's what I meant by "enable empty index". Ok then, new Piranha option is the way. ArgumentIndexOptional is a good name. Will send updated PR.

@lazaroclapp
Copy link
Contributor

Instead of -1, see the suggestion here which references this. We can add an option ArgumentIndexOptional to Piranha and it will be false by default. This will avoid the confusion related to misconfiguration. For your codebase (and similar scenarios), the option can be set to true when Piranha is invoked.
By adding this option, you can also leave most of the noFlagTestCases as is and simply update the configuration options passed to the tests.

Yes, that's what I meant by "enable empty index". Ok then, new Piranha option is the way. ArgumentIndexOptional is a good name. Will send updated PR.

Sorry for that extra work, but it's a better long term solution and, compared with the rest of this PR, just adding that option will be a fairly small change, I think. I would not be comfortable releasing a new version of Piranha with "empty index" allowed by default, even if we could land this to master.

@pranavsb
Copy link
Contributor Author

pranavsb commented Jun 14, 2020

Pushed support for ArgumentIndexOptional and - brace yourself - more tests!

Update: the build is failing. Probably a config / goJF issue. Looking into it.

Copy link
Contributor

@lazaroclapp lazaroclapp left a comment

Choose a reason for hiding this comment

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

This is basically ready to land. I have just two short nit fixes and a question.

}
methodPropertiesForMethodName.add(methodProperty);
} else {
Copy link
Contributor

Choose a reason for hiding this comment

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

For readability, consider reversing this conditional, so you have:

if (methodName == null || getValueStringFromMap(methodProperty, FLAG_TYPE_KEY) == null) {
   throw ...;
}
if (!isArgumentIndexOptional && getArgumentIndexFromMap(methodProperty) == null) {
   throw ...;
}
List<Map<String, Object>> methodPropertiesForMethodName = ...;
...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done.
Also replaced the add methodProperty/new ArrayList logic with a one-liner using computeIfAbsent

@@ -372,15 +386,17 @@ private API getXPAPI(
// if it's not a match, skip to next method property map
String returnType = getValueStringFromMap(currentMethodProperties, RETURN_TYPE_STRING);
if (returnType != null) {
if (!isMethodTreeMatchesMethodProperty(mst, RETURN_TYPE_STRING, returnType)) {
String mReturn = ASTHelpers.getReturnType(mst).toString();
if (!returnType.equalsIgnoreCase(mReturn)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Why equalsIgnoreCase instead of case sensitive equals?

Copy link
Contributor Author

@pranavsb pranavsb Jun 15, 2020

Choose a reason for hiding this comment

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

Just to allow users the flexibility of wrongly capitalizing stuff. Like java.lang.string or the fully qualified name of their class.

@lazaroclapp - waiting for your followup - if any - before pushing.

Copy link
Contributor

Choose a reason for hiding this comment

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

I say let's compare case-sensitive, since Java itself is case sensitive, I think, e.g. you can have both a type com.foo.Bar and one called com.foo.bar at the same time in the same JVM (you probably shouldn't, but still). That said, I have no super strong opinion here. cc: @mkr-plse Any thoughts?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

...you can have both a type com.foo.Bar and one called com.foo.bar ...

Oh, didn't know this. Then a case sensitive match is a better default for now - just in case someone does this.

Updated and fixed testcase.

@pranavsb
Copy link
Contributor Author

Pushed case-sensitive match for returnType and receiverType (and some refactoring)

Copy link
Contributor

@lazaroclapp lazaroclapp left a comment

Choose a reason for hiding this comment

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

LGTM!! 😄 🎉

@lazaroclapp
Copy link
Contributor

Congrats and thank you for the massive contribution @pranavsb !

@pranavsb
Copy link
Contributor Author

Congrats and thank you for the massive contribution @pranavsb !

Thanks for all your help. It was good fun! :)
@lazaroclapp @mkr-plse

@mkr-plse
Copy link
Contributor

Indeed, this is a massive contribution. Thanks a lot @pranavsb. Looking forward to more such contributions ;)

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

4 participants