summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Node
Commit message (Collapse)AuthorAgeFilesLines
* Reorganize the repo. Moved src/engine/SCons to ./SCons to be more in line ↵William Deegan2020-05-068-11578/+0
| | | | with current python packaging practices
* tests: use unittest decorator for skippingMats Wichmann2020-04-291-24/+24
| | | | | | | | | FSTests updated to use the suggested way of skipping tests - a decorator which does the check up front, rather than a manual check inside the function. Effect: test run will show 's' rather than '-' on skipped tests. Signed-off-by: Mats Wichmann <mats@linux.com>
* Fix inconsistencies between RootDir attributesAdam Gross2020-04-021-1/+7
| | | | | | | | | | | | The RootDir class was returning different values for path and _path as well as different values for abspath and _abspath. This is because the underscored versions were being set in the RootDir constructor, while the non-underscored versions were going through the EntryProxy wrapper, which is only coded to do a simple append of paths. I considered trying to fix EntryProxy to detect this case but instead went with a simpler approach where RootDir overrides the attributes that it wants to avoid EntryProxy calls. Right now I have this as path and abspath.
* Remove u' u" from strings. no longer neededWilliam Deegan2020-02-182-18/+6
|
* more post py27 cleanupWilliam Deegan2020-02-181-16/+5
|
* replace dictionary initializations with simpler logicWilliam Deegan2020-02-182-13/+4
|
* Remove 'from __future__ import print_function' no longer needed as we're ↵William Deegan2020-02-173-6/+0
| | | | dropping < py 3.5
* Fix some pyflakes warningsMats Wichmann2020-01-233-12/+12
| | | | | | | | These are of the kind that would not be fixed by a code reformat (Black). These should all be trivial. They're nearly all in unit tests (all but two), since I haven't cleaned up as many there in the past. Signed-off-by: Mats Wichmann <mats@linux.com>
* Merge pull request #3528 from mwichmann/less-list-convWilliam Deegan2020-01-161-2/+2
|\ | | | | Stop converting to list where not needed
| * Stop converting to list where not neededMats Wichmann2020-01-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Python 3 returns a special object, which is iterable, rather than a list when you ask for dictionary keys(), values(), items(). if you then proceed to iterate over it it's being used as expected and doesn't have to be forced to a list first. This occurs a number of places in this form: for k in list(something.keys()): Also there are several places where the code loops over the result of dict.keys() and then uses the key to index into the dictionary, this can be replaced by: for k, v in something.items(): Signed-off-by: Mats Wichmann <mats@linux.com>
* | Change ValueWithMemo() to take into account any name passed when memoizing ↵William Deegan2020-01-162-3/+22
| | | | | | | | Value()'s
* | Plumb through name in ValueWithMemoAdam Gross2020-01-152-1/+2
| |
* | Add name parameter as requested in PRAdam Gross2020-01-152-3/+11
| |
* | Update and improve testsAdam Gross2020-01-101-1/+2
| | | | | | | | | | | | | | This change integrates various review feedback, including: 1. Validates the result of Dir.get_contents() in PythonTests.py. 2. Adds a functional test for having value as a dependency.
* | Merge branch 'master' into topic/grossag/valuenameAdam Gross2020-01-107-47/+109
|\ \ | |/
| * Merge pull request #3478 from grossag/topic/grossag/valueWilliam Deegan2019-12-302-9/+68
| |\ | | | | | | Memoize Environment.Value() to improve performance
| | * Fix ambiguous variable name sider issueAdam Gross2019-12-291-3/+3
| | |
| | * Clean up the code and use try/except more to optimize thingsAdam Gross2019-12-292-20/+20
| | |
| | * Exclude non-primitive values from memoizationAdam Gross2019-12-232-0/+17
| | |
| | * Address PR feedbackAdam Gross2019-12-121-4/+2
| | |
| | * Add a test to confirm that built values are not memoizedAdam Gross2019-11-271-0/+11
| | |
| | * Fix some existing flake8 validation issues in PythonTests.pyAdam Gross2019-11-251-5/+7
| | |
| | * Add test cases for memoizationAdam Gross2019-11-251-0/+11
| | |
| | * Improve readability by explicitly declaring _memoLookupMap as globalAdam Gross2019-11-251-0/+2
| | |
| | * Memoize environment.Value() to improve performanceAdam Gross2019-11-251-6/+24
| | | | | | | | | | | | | | | | | | The code I work on calls env.Value() often on the same values as part of consolidating outside dependencies. This change improves performance of that call by memoizing the results.
| * | syntax fixups suggested by PyCharmMats Wichmann2019-12-234-26/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop unneeded parens. Drop trailing semicolons. Triple double-quote docstrings. Regexes drop unneeded escapes. Spaces around parens, braces: remove/add. Some one-tuples get their missing closing comma. A couple of sets use set init syntax {foo} instead of set([iter]) now. And a fiddle in Node to reduce lookup time on md5 signature functions (came about because of a line-too-long issue, initially) Signed-off-by: Mats Wichmann <mats@linux.com>
| * | checker fixes: None, trailing ws, list initMats Wichmann2019-12-211-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | checker-suggested fixes: Mostly, fix remaining instances of comparing none without "is" Some trailing whitespace on lines A couple of instances of list init followed immediately by several appends, turned into a single list init Some double comparisons turned into a single expression Signed-off-by: Mats Wichmann <mats@linux.com>
| * | Optimize for most common case in Entry.disambiguate()Mathew Robinson2019-12-121-5/+5
| |/ | | | | | | This removes many unnecessary os.stat and related FS IO calls.
* | Add a functional testAdam Gross2019-12-022-3/+2
| |
* | Avoid a flake8 warning where "contents" is unusedAdam Gross2019-11-251-0/+1
| |
* | Add support for Value objects being implicit dependenciesAdam Gross2019-11-252-0/+14
|/ | | | | | | | | | | As part of consolidating outside dependencies, the code I work on takes on Value objects as implicit dependencies. That allows us to take on a dependecy to an entire build (e.g. our compiler) rather than 500 files from it. This has worked fine in practice for months now, but it turns out to break when using caching, because Node.get_contents() expects all dependencies to have the "name" attribute. This change adds that attribute to the Value class and a test to confirm that Node.get_contents() works now.
* Improve threading performance by sharing NodeInfo across threadsMathew Robinson2019-08-192-8/+7
|
* Add test and fix to regression in current 3.1.0 dropJason Kenny2019-07-301-0/+2
|
* Remove usage of DeciderNeedsNode which has been removed from --debug=explain ↵William Deegan2019-07-241-4/+1
| | | | code
* [ci skip] Fix spelling picked up by siderWilliam Deegan2019-07-141-1/+1
|
* Fix docstrings and comments for repo node changesWilliam Deegan2019-07-141-6/+8
|
* Clean up __slots__ specification to be list, remove some obsoleted codeWilliam Deegan2019-07-091-4/+2
|
* Fix __slots = ('single element') -> ('single element',) per finding by mwichmannWilliam Deegan2019-07-051-3/+3
|
* remove unnecessary DeciderNeedsNode exceptionWilliam Deegan2019-07-051-15/+0
|
* Fix _add_strings_to_dependency_map() perf degredationWilliam Deegan2019-06-281-2/+1
|
* Restore MD5-Timestamp performance by removing try/except from every call. ↵William Deegan2019-06-262-44/+75
| | | | Also some optimized logic for updating and using the dependency_map built as part of the decider. Fixed tests. Note Deciders now need a fourth argument 'repo_node' which is the repository node for the file if it's to be used. This is currently only used by md5-timestamp decider File.changed_timestamp_then_content()
* PY38: Resolve duplicate creation of 'work' subdir which yielded warnings. ↵William Deegan2019-05-301-1/+3
| | | | Also improve exception handling message in test.subdir()
* PEP8 fileWilliam Deegan2019-05-301-326/+374
|
* Merge pull request #3345 from mwichmann/py38warns4-testsWilliam Deegan2019-04-281-2/+2
|\ | | | | [wip] Py38warns4 tests
| * [PY 3.8] test fixes for file closings, rawstringsMats Wichmann2019-04-251-11/+11
| | | | | | | | | | | | | | On a linux host (missing some things that may be on the Travis CI setup), Py3.8a3 now shows 19 fails, 1048 pass, with 84 Warning: messages. Signed-off-by: Mats Wichmann <mats@linux.com>
| * [PY 3.8] file closes in tools and othersMats Wichmann2019-04-251-2/+2
| | | | | | | | Signed-off-by: Mats Wichmann <mats@linux.com>
* | Merge pull request #3360 from mwichmann/isnotWilliam Deegan2019-04-282-18/+18
|\ \ | | | | | | Some more lint-derived cleanups
| * | Some more lint-derived cleanupsMats Wichmann2019-04-272-18/+18
| |/ | | | | | | | | | | | | | | | | | | | | | | Consistently use "not is" and "not in", many instances used the form "not x is y" instead, which pylint objected to. A couple of bare except clauses got a qualifier. Files otherwise touched had trailing whitespace cleaned up as well. These are all things that sider would complain about if a change happened nearby, so this is pre-emptive. Signed-off-by: Mats Wichmann <mats@linux.com>
* | Merge branch 'master' into enhanced_debug_explainWilliam Deegan2019-04-271-0/+20
|\ \
| * \ Merge branch 'master' into ↵William Deegan2019-04-263-8/+8
| |\ \ | | |/ | | | | | | fix_mongo_bug_33111_multiple_targets_via_emitter_spurious_rebuilds