Commit Graph

374 Commits

Author SHA1 Message Date
Ben Liblit 6bcca003a2 Tweak output dirs to match what Buildship puts into ".classpath" 2018-04-18 11:29:25 -05:00
Ben Liblit 89860b53bb Let Buildship create new settings files when importing
These settings files currently are generated with an initial timestamp
comment line, which is not something we'd want to track in version
control.  Fortunately, the contents of these files are entirely
mundane, so there should be no problem with having Buildship generate
them anew each time a developer imports WALA into Eclipse as an
existing Gradle project.
2018-04-18 11:29:25 -05:00
Ben Liblit 4b48f8ee4d Have Buildship add Eclipse plugin (PDE) nature to some subprojects
Specifically, we need this for subprojects that build included plugins
for any of the "*_feature" subprojects.
2018-04-18 11:29:25 -05:00
Ben Liblit 310ef1daa5 Exclude Eclipse ".project" and ".classpath" from version control
Apparently Buildship generates these when one uses Import -> Existing
Gradle Project:
<https://discuss.gradle.org/t/buildship-eclipse-plug-in-multiproject-builds/24030/5>.
We can use the Gradle "eclipse" plugin if customizations are
necessary, but my impression is that the intent is to treat ".project"
and ".classpath" as generated files, not sources to be tracked in
source control.
2018-04-18 11:29:25 -05:00
Ben Liblit 1432e18c37 Clean up some simple syntactic redundancy in dependency declarations 2018-04-18 11:29:25 -05:00
Ben Liblit 5d5fa18b5f Replace source directories rather than appending to them
I was confused about the differences among:

	srcDir 'foo'
	srcDirs ['foo']
	srcDirs = ['foo']

As it turns out, the first two append to the set of source
directories, while the last replaces this set entirely.  I generally
want replacement, since WALA's current directory layout never matches
Gradle's assumed defaults.
2018-04-18 11:29:25 -05:00
Ben Liblit 377d7586ef Consistently use simple sorted order for dependencies
This isn't even sorting by library or subproject name.  It's just a
dumb textual sort of the contents of each line.
2018-04-18 11:29:25 -05:00
Ben Liblit 530d74929f Many improvements to Gradle build support, including within Eclipse 2018-04-18 11:29:24 -05:00
Sungho Lee 50d0f7ee71 Change build.gradle files for proper format and delete all tests 2018-04-18 11:29:24 -05:00
Sungho Lee 4a31927b00 Gradle build scripts 2018-04-18 11:29:24 -05:00
Ben Liblit 99c2493e37 Revert "Build WALA using Gradle instead of Maven" (#298) 2018-04-18 12:15:56 -04:00
Ben Liblit 6639d8b93a Bump version to 1.5.0-SNAPSHOT before merging with WALA master
This gives the WALA maintainers the option of doing future 1.4.5+
releases from of a pre-Gradle branch if these merged Gradle changes
turn out to be more disruptive than expected.
2018-04-17 15:32:01 -05:00
Ben Liblit d14d40ee3f Tweak output dirs to match what Buildship puts into ".classpath" 2018-04-17 15:02:35 -05:00
Ben Liblit efd3a6ab18 Let Buildship create new settings files when importing
These settings files currently are generated with an initial timestamp
comment line, which is not something we'd want to track in version
control.  Fortunately, the contents of these files are entirely
mundane, so there should be no problem with having Buildship generate
them anew each time a developer imports WALA into Eclipse as an
existing Gradle project.
2018-04-17 15:02:35 -05:00
Ben Liblit da27efec97 Have Buildship add Eclipse plugin (PDE) nature to some subprojects
Specifically, we need this for subprojects that build included plugins
for any of the "*_feature" subprojects.
2018-04-17 15:02:35 -05:00
Ben Liblit be11083cd8 Exclude Eclipse ".project" and ".classpath" from version control
Apparently Buildship generates these when one uses Import -> Existing
Gradle Project:
<https://discuss.gradle.org/t/buildship-eclipse-plug-in-multiproject-builds/24030/5>.
We can use the Gradle "eclipse" plugin if customizations are
necessary, but my impression is that the intent is to treat ".project"
and ".classpath" as generated files, not sources to be tracked in
source control.
2018-04-17 15:02:35 -05:00
Ben Liblit db348b4ddd Clean up some simple syntactic redundancy in dependency declarations 2018-04-17 15:02:35 -05:00
Ben Liblit 651f40c170 Replace source directories rather than appending to them
I was confused about the differences among:

	srcDir 'foo'
	srcDirs ['foo']
	srcDirs = ['foo']

As it turns out, the first two append to the set of source
directories, while the last replaces this set entirely.  I generally
want replacement, since WALA's current directory layout never matches
Gradle's assumed defaults.
2018-04-17 15:02:35 -05:00
Ben Liblit aae1c2230a Consistently use simple sorted order for dependencies
This isn't even sorting by library or subproject name.  It's just a
dumb textual sort of the contents of each line.
2018-04-17 15:02:35 -05:00
Ben Liblit 401fbaf89a Many improvements to Gradle build support, including within Eclipse 2018-04-17 15:02:35 -05:00
Sungho Lee 6dceb3d8ef Change build.gradle files for proper format and delete all tests 2018-04-17 15:00:03 -05:00
Sungho Lee 04923544f0 Gradle build scripts 2018-04-17 15:00:03 -05:00
Ben Liblit 4bb4a3104a WALA uses Git, so CVS ignore patterns are moot 2018-04-14 19:08:14 -05:00
Julian Dolby 883b7282f4
Merge pull request #287 from pierlauro/master
Protected visibility for JavaSourceLoaderImpl's internal methods and classes
2018-04-13 17:02:24 -04:00
Ben Liblit 6546d5d6a4 Resolve the last two Eclipse warnings about using raw types
Fixes bug #244.
2018-04-13 12:53:33 -05:00
Julian Dolby 41d254d547 more type parameters for analysis engine 2018-04-10 16:00:44 -04:00
Pierlauro Sciarelli 886ba11c1e Protected visibility for JavaSourceLoaderImpl's internal methods and classes 2018-03-08 15:52:20 +01:00
Julian Dolby c8cdaf8616 further refactoring to enable more reuse
eliminate all non-jva 8 compilation
2018-02-05 15:18:37 -08:00
Ben Liblit 9c83e87cc1 Merge branch 'master' into modernization-java-8-lambdas-and-method-references 2017-11-29 10:51:33 -06:00
Ben Liblit ebfd885d22 Use modern for-each loops where possible
Java sources used as test data have been excluded from this mass
clean-up.
2017-11-28 14:44:53 -06:00
Ben Liblit 74e0640771 Replace simple lambdas with method references wherever possible 2017-11-27 11:31:15 -06:00
Ben Liblit 790d37781b Convert many single-method anonymous classes to lambdas
Eclipse's automated code clean-up tool did most of the heavy lifting
here: it specifically has a clean-up option for converting functional
interfaces to lambdas.  I merely had to revert the automated changes
for a single enumeration class for which it produced invalid results,
and for a few test inputs that apparently aren't set up to be compiled
with Java 8.
2017-11-27 11:31:15 -06:00
Ben Liblit ded9e880b1 Update Maven Central configurations to also use Java 8 (#264)
E-mail exchanged with Julian Dolby suggests that this is the right
thing to do, and that it should have been done back when we converted
other parts of the build configuration to Java 8.
2017-11-23 12:55:05 -08:00
Julian Dolby d124256835 remove java 7 support 2017-11-11 21:20:41 -05:00
Julian Dolby 8d65788aef convert to Java 8 Function and Predicate 2017-11-11 20:29:04 -05:00
Julian Dolby b5b67f3d7c issues with mvncentral.xml 2017-08-25 12:00:39 -04:00
Julian Dolby b6af5267f1 java 8 changes
minor fixes, such as making CheckForFrontEndErrors more accessible
minor hacks to make stuff compile with TeaVM
2017-08-25 10:58:00 -04:00
Julian Dolby e599d58cd7 Merge branch 'master' of https://github.com/wala/WALA 2017-08-16 14:50:12 -04:00
Julian Dolby 3371e23de0 java 8 stuff 2017-08-16 14:50:01 -04:00
Ben Liblit b70d69d62f Treat many Eclipse plugin-related problems as errors
These are all problems that Eclipse can detect, but that it detects no
instances of right now.  Treating these as warnings instead of errors
should help prevent us from slipping backward in the future.
2017-08-16 11:36:46 -07:00
Julian Dolby a92b881c22 Merge branch 'master' of https://github.com/wala/WALA 2017-08-15 12:39:27 -04:00
Julian Dolby 6431cbeb60 java 8 2017-08-15 12:39:19 -04:00
Ben Liblit cb6d3b282a Fix Eclipse warnings about redundant null checks and assignments
Most of these are harmless, and are best fixed simply by removing the
redundant check or assignment.  The one in FlowType.compareBlocks,
however, revealed a real problem.  This code checks for nullness of
`a` *after* having called a method on `a`.  Assuming that `a` can
indeed be `null` here, the check must come first to avoid a
`NullPointerException`.

In several places, I saw code of this form:

   if (thing == null)
     assert thing != null : ... ;

I honestly don't understand the purpose of that `if` statement.  Why
not just have the `assert` statement there directly?  I removed the
seemingly irrelevant `if` statements in these cases, but if this is
some intentional pattern, please explain it to me.

In a few places where nullness is statically known but non-obvious,
add assert statements to point out what's going on to help future
developers.

Upgrade future such warnings to errors to keep us moving in a cleaner
direction.
2017-08-15 09:11:29 -07:00
Julian Dolby 15f54f0248 Merge branch 'master' of https://github.com/wala/WALA 2017-08-06 10:30:32 -04:00
Manu Sridharan e8bdf2f8f9 version 1.4.4-SNAPSHOT 2017-08-06 07:25:20 -07:00
Julian Dolby 69929b4985 Merge branch 'master' of https://github.com/wala/WALA 2017-08-06 08:06:02 -04:00
Manu Sridharan d901b13425 version 1.4.3 2017-08-05 20:52:32 -07:00
Julian Dolby 1d144db6d5 Merge branch 'master' of https://github.com/wala/WALA 2017-08-02 12:27:22 -04:00
Ben Liblit f7dc0a06de Treat unused parameters as errors, not merely warnings
We've fixed or suppressed all such warnings, except in projects
containing test inputs.  Let's make sure no more appear in the future.
2017-07-31 15:29:00 -07:00
Ben Liblit 6087b73cee Fix or suppress all 242 Eclipse warnings about unused parameters
In general, my approach was to try to eliminate each unused parameter
using Eclipse's "Change Method Signature" refactoring.  That did not
always succeed: a parameter may be unused in some base class method,
but then be used in subclass's override of that method.  In cases
where refactoring to eliminate a parameter failed, I instead annotated
the parameter with '@SuppressWarnings("unused")' to silence the
warning.

Note: this group of changes creates a significant risk of
incompatibility for third-party WALA code.  Some removed parameters
change externally-visible APIs.  Furthermore, these changes do not
necessarily lead to Java compilation errors.  For example, suppose
third-party code subclasses a WALA class or interface, overrides a
method, but does not annotate that method as @Override.  Removing a
parameter means that the third-party method no longer overrides.  This
can quietly change code behavior without compile-time errors or
warnings.  This is exactly why one should use @Override wherever
possible, but we cannot guarantee that third-party WALA users have
done that.
2017-07-31 15:29:00 -07:00