summaryrefslogtreecommitdiffstats
path: root/SCons/Scanner/JavaTests.py
Commit message (Collapse)AuthorAgeFilesLines
* Followon to PR #4348: more bool fixesMats Wichmann2023-06-161-2/+2
| | | | | | | | | | | | | | Manually fixed up some things related to bool, e.g. simple functions which just did "return 1" were interpreted by the tool as returning int, when bool was really the intent. Functions/methods named like "is*", "has*", "exists", "rexists" (and others) are now pretty consistently marked as returning bool. A couple of minor alignments of branched definitions, and a couple of docstring adjustments made. If Tools which had old heading style were touched, they got the new style. Signed-off-by: Mats Wichmann <mats@linux.com>
* Minor scanner tweaksMats Wichmann2023-06-081-2/+2
| | | | | | | Marked a couple of scanner methods that don't use "self" as @staticmethod for consistency. Signed-off-by: Mats Wichmann <mats@linux.com>
* Add some cheap return and parameter annotationsMats Wichmann2023-05-011-18/+18
| | | | | | | | | | | | | | | | | Use: https://github.com/JelleZijlstra/autotyping to add "safe" return annotations. Where a parameter has a default value that is an obvious scalar type (bool, int, str, etc.) add those annotations as well. Also fixed two small bugs that popped up when sanity-checking with mypy. One in FortranCommon, where a return had been previously annotated to be a tuple of Action, which should be ActionBase - Action is the factory function, not the base class. The other was a typo in the error raised in _add_cppdefines - the message was formatted with the value of "define" which should have been "defines". Signed-off-by: Mats Wichmann <mats@linux.com>
* feat: adds JAVAPROCESSORPATH construction variable; updates JavaScanner to ↵djh2023-01-131-0/+64
| | | | scan JAVAPROCESSORPATH
* Java scanner don't split JAVACLASSPATH on spaceMats Wichmann2022-10-171-7/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The scanner now splits JAVACLASSPATH before searching only if it is passed as a scalar (string); it no longer recurses to split elements of a list value - this is more consistent with other SCons usage. No longer splits on space, rather splits on os.pathsep, as considerably more useful for a search-path variable. The latter change avoids breaking paths with an embedded space (usually from Windows). This is a "breaking change" from the new behavior introduced in 4.4 where a JAVACLASSPATH like "aaa bbb ccc" would have been split into ["aaa", "bbb", "ccc"] - now it will be left unchanged in the scanner. However a JAVACLASSPATH like "aaa;bbb;ccc" will now be split into ["aaa", "bbb", "ccc"]. This behavior only affects the scanner - there is no change in how JAVACLASSPATH gets transformed into the "-classpath ARG" argument when calling JDK elements. The former behavior was presumably unintended, and definitely broke on a space-containing path (e.g. "My Classes". The unit test is expanded to test for a path string with spaces, and for a path string containing a search-path separator. Documentation tweaks: explain better how JAVACLASSPATH (and the other two Java path variables) can be specified, and whether or not SCons changes them before calling the JDK commands. Added note that JAVABOOTCLASSPATH is no longer useful, and a note about the side effect that SCons always supplies a "-sourcepath" argument when calling javac. Fixes #4243 Signed-off-by: Mats Wichmann <mats@linux.com>
* feat: adds minor java improvementsdjh2021-07-051-0/+160