| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
| |
RELNOTES[INC]: The flag --incompatible_descriptive_string_representations is no
longer available, old style string representations of objects are not supported
anymore.
PiperOrigin-RevId: 171952621
|
|
|
|
|
| |
RELNOTES: None
PiperOrigin-RevId: 165489091
|
|
|
|
|
|
|
|
|
|
| |
Simplify the code by providing the default implementation of
`SkylarkValue$isImmutable` that always returns false. All objects are
considered mutable unless their `isImmutable` method is overridden.
This change doesn't affect the current behavior.
PiperOrigin-RevId: 161422029
|
|
|
|
|
|
|
|
|
|
|
| |
If --incompatible_descriptive_string_representations is passed, labels are converted
to strings using `repr` differently: `Label("//package:name")` instead of
`"//package:name"`
This CL doesn't affect representations of other object types but provides the
necessary infrastructure for it.
PiperOrigin-RevId: 160955284
|
|
|
|
|
|
|
| |
It's now easier to customize Printer if in different situations objects should
be printed differently. Also its API is cleaner now. Names of methods of SkylarkValue objects now reflect names of Skylark functions: SkylarkValue#repr and SkylarkPrintableValue#str.
PiperOrigin-RevId: 160635154
|
|
|
|
|
|
| |
RELNOTES: None.
PiperOrigin-RevId: 157446717
|
|
|
|
|
|
|
|
|
|
| |
Dict keys can in theory belong to different types, it's not allowed anymore to
compare such objects by < in Skylark, so the Printer class shouldn't do it
either.
--
PiperOrigin-RevId: 147827109
MOS_MIGRATED_REVID=147827109
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
SkylarkList now implements the List interfaces, except that its mutating methods
throw an UnsupportedOperationException, just like ImmutableList does.
To actually mutate a SkylarkList, you need to pass a Location and a suitable
Environment object with a matching Mutability while it is still active.
Introduce SkylarkMutable and SkylarkMutable.MutableCollection to better handle
mutable data structures.
Remove some functions in EvalUtils made obsolete by this and previous changes regarding Skylark lists.
--
MOS_MIGRATED_REVID=112768457
|
|
|
|
|
|
|
| |
no).
--
MOS_MIGRATED_REVID=104655508
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Some rules write the toString representation of lists of files to disk and then read it back again. This breaks that.
--
MOS_MIGRATED_REVID=104524336
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=104197461
|
|
|
|
|
|
|
|
|
|
| |
- Label parsing can be simplified
- lib.syntax is only contains the code for Skylark and is reasonably independent from the problem domain of building things
This change is mostly only changes to imports declarations. The rest is reversing the dependency between :cmdline and :syntax and moving a tiny amount of code between Printer and FilesetEntry and the addition of SkylarkPrintableValue that I couldn't be bothered to separate out into its own change.
--
MOS_MIGRATED_REVID=103527877
|
|
|
|
|
| |
--
MOS_MIGRATED_REVID=103374106
|
|
|
|
|
|
|
|
|
| |
syntax that means "refer to the main repository".
There isn't an overarching plan for what we are going to do with the cmdline package, which seems to be separated from the .syntax one in all sorts of awkward ways.
--
MOS_MIGRATED_REVID=103088960
|
|
|
|
|
|
|
|
| |
Move away global constants and global namespaces out of Environment
and into a new file Runtime.
--
MOS_MIGRATED_REVID=101940218
|
|
|
|
|
|
|
|
|
|
| |
Rename some methods to avoid clashes.
Add function formattable to create lazily-formatted objects,
remove now unused strFormattable and reprFormattable.
Also some whitespace cleanup.
--
MOS_MIGRATED_REVID=101459565
|
|
|
|
|
|
|
|
|
| |
- Objects of different types can now be compared.
- Printer now prints dictionaries in a deterministic order, even when the keys have different types.
- testEval() in EvaluationTestCases evaluates both expressions instead of comparing expression strings. Consequently, if a statement describes a collection, its order does no longer matter when doing the comparison.
--
MOS_MIGRATED_REVID=99829458
|
|
|
|
|
|
|
| |
quotation marks
--
MOS_MIGRATED_REVID=97320494
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
*** Reason for rollback ***
Breaks 'blaze query'
*** Original change description ***
Skylark: write labels readably
Write a label as Label("//x:x") instead of merely "//x:x", so it can be read
and evaluated back, as per the Python convention. However, the OutputFormatter
for BUILD files still needs to output "//x:x".
--
MOS_MIGRATED_REVID=97156166
|
|
|
|
|
|
|
|
|
| |
Write a label as Label("//x:x") instead of merely "//x:x", so it can be read
and evaluated back, as per the Python convention. However, the OutputFormatter
for BUILD files still needs to output "//x:x".
--
MOS_MIGRATED_REVID=96209979
|
|
|
|
|
|
|
|
| |
Refactor the implementation of format.
Add %r. Improve some error messages.
--
MOS_MIGRATED_REVID=96154542
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
to //tools/android: .
This is useful because we can then eventually implement an android_tools_repository() rule that lets Bazel download the Android tools from somewhere instead of requiring it to be in every workspace with Android tools.
The number of tools here is somewhat scary, therefore, I'm considering creating an android_tools rule which would have an attribute for each of these things.
Some non-trivial things about this CL:
- The labels to load are removed from AndroidConfiguration because they would resolve to e.g. //external:dx_jar, which labels just don't exist and I don't want to add dummy //external:labels not prefixed with android_
- RedirectChaser is taught how to chase redirect through bind() rules because the Android SDK is now found by //external:android_sdk -> //tools/android:sdk -> @androidsdk//:sdk . Ideally, it would be ///external:android_sdk -> @androidsdk//:sdk, but I figured I'd not fix that in this CL.
--
MOS_MIGRATED_REVID=96080553
|
|
Move printing code from EvalUtils to Printer.
Rename functions in Printer:
printValue becomes str or print,
prettyPrintValue becomes repr or write,
formatString becomes format,
makeFormattable becomes strFormattable,
prettyPrintValues becomes listString.
write being self-sufficient is made the reference,
and print is the one that is a wrapper around write,
rather than the other way around, avoiding mutual recursion.
--
MOS_MIGRATED_REVID=95897834
|