Commit dd65d8f
Add the hack_collections compiler option.
Summary:
# What?
Add the `hack_collections` compiler option.
# Why?
`hack_collections`, which was the implicit default in the absence of `arrays` and `no_use_hack_collections`, is now explicit.
# Fixtures
- Add `hack_collections` to `cmd` files.
- Generated fixtures must not change.
# Context
`arraysets`, `no_use_hack_collections`, `stricttypes`, `array_migration`, `shape_arraykeys`, `const_collections` are all compiler options that control the generation of container fields. To make code generator simpler and easier to reason about, identify which of these can be removed/merged.
The new options based on the ones that are currently in use:
`legacy_arrays` replaces `no_use_hack_collections`.
`hack_collections`, which was the implicit default in the absence of `arrays` and `no_use_hack_collections`, is now explicit.
`arrays` will eventually become the default and cease to exist as an explicit option.
# The steps
The item in bold corresponds to the current diff.
1. Use new compiler options based on the ones that already exist.
1. Make arrays the default option.
1. Use the legacy arrays + hack collections logical equivalent of arrays.
1. Introduce hack collections wherever necessary.
1. Replace no use hack collections with legacy arrays.
1. Remove arraysets if arrays present.
1. Rename `no_use_hack_collections` compiler option to `legacy_arrays`.
1. **Add `hack_collections` compiler option.**
1. Remove references to the `arrays` compiler option.
1. Delete the `arrays` compiler option.
Reviewed By: rmakheja
Differential Revision: D67617729
fbshipit-source-id: 5101fc8c1ad54cf168ab70e5e5589922dc71c74c1 parent 87b947a commit dd65d8f
File tree
44 files changed
+56
-56
lines changed- third-party/thrift/src/thrift/compiler
- generate
- test/fixtures
- adapter
- basic-annotations
- basic-structured-annotations
- basic
- complex-union
- constants
- default_values
- doctext
- enums
- exceptions
- from_map_construct
- hack-attributes
- hack-const-collections
- hack-enum-typing
- hack-exceptions-transparent-enum
- hack-exceptions
- hack-mangledsvcs
- hack-map-with-enum-key
- hack-structs
- hack_field_wrapper_with_collections
- hack_module_internal
- hack_service
- hack_typedef
- inject_metadata_fields
- int_limits
- interactions
- namespace_from_package_without_module_name
- namespace_from_package
- optionals
- params
- php_hack_ns
- serialization_field_order
- shape_arraykeys
- shape_construct
- shape_nullable_everything
- shapes_final
- shapes_php_arrays
- shapes
- sink
- soft-attribute
- stream
- terse_write
- types
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
44 files changed
+56
-56
lines changedLines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
126 | 126 | | |
127 | 127 | | |
128 | 128 | | |
129 | | - | |
130 | | - | |
131 | | - | |
| 129 | + | |
132 | 130 | | |
133 | 131 | | |
134 | 132 | | |
| |||
7622 | 7620 | | |
7623 | 7621 | | |
7624 | 7622 | | |
| 7623 | + | |
7625 | 7624 | | |
7626 | 7625 | | |
7627 | 7626 | | |
| |||
7635 | 7634 | | |
7636 | 7635 | | |
7637 | 7636 | | |
| 7637 | + | |
7638 | 7638 | | |
7639 | 7639 | | |
7640 | 7640 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
4 | 4 | | |
5 | 5 | | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
0 commit comments