Bug 1687945 [wpt PR 27273] - [resources] Fix conftest.py for pytest>6, a=testonly
[gecko.git] / third_party / rust / glsl / CHANGELOG.md
blob81fbd3f867e82fe222e793026027b69dc83d2d03
1 # 4.0.3
3 > Fri Mar 6th 2020
5 - Move all the unit tests code into their ow module to prevent rustc from parsing them if we
6   don’t build with tests.
8 # 4.0.2
10 > Mon 10th Feb 2020
12 - Remove the `lexical` feature from `nom`. It’s useful only when using functions such as the
13   `float` combinator, which we don’t use.
15 # 4.0.1
17 > Tue 21st Jan 2020
19 - Fix a bug occurring in the function-like `#define` parser (i.e. `#define foo(x) (y)`) that
20   would prevent the use of whitespaces in the argument list.
22 # 4.0
24 > Mon 6th Jan 2020
26 ## Major changes
28 - Add support for `attribute` and `varying` keyword as a backward-compatible parser.
29 - Fix binary operator associativity. They were (_erroneously_) right-associative. They’re now
30   parsed as left-associative.
32 # 3.0
34 > Wed 14th Nov 2019
36 ## Major changes
38 - `JumpStatement::Return` now takes an optional `Expr` instead of an `Expr` directly. That allows
39   for parsing statements such as `return;`, which should have
40   been supported from the beginning.
41 - Support for missing preprocessor directives:
42   - `#if`.
43   - `#ifdef`.
44   - `#ifndef`.
45   - `#elseif`.
46   - `#else`.
47   - `#endif`.
48   - `#error`.
49   - `#include`.
50   - `#line`.
51   - `#pragma`.
52   - `#undef`.
54 ## Patch changes
56 - Add a `rustfmt.toml` to reformat everything and stay consistent. If you want contribute, ensure
57   you are correctly using `rustfmt` (either by running `cargo fmt` before submitting a PR or by
58   configuring your editor to format the code for you). This is important, as not respecting the
59   formatting would make your contribution impossible to merge due to a CI check.
60 - Support for _multiline_ annotations (`\`). Multiline annotations are currently supported as
61   part of _spaces_ — i.e. you cannot use them to break an identifier on two lines for instance.
62   This choice makes it faster to parse without too much compromises (after all, `\` is mostly used
63   in CPP directives in GLSL).
64 - Fix a bug with _recoverable parsers_ that would produce parent parsers to ignore GLSL grammar
65   errors. That fix also implies a boost in performance due to short-circuiting optimizations.
67 # 2.0.1
69 > Fri 8th Nov 2019
71 - Improve performance of expression parsers.
73 # 2.0
75 > Thu 24th Oct 2019
77 ## Major changes
79 - Add `ShaderKind::Compute`.
80 - Remove `NonEmpty::from_iter` and `TranslationUnit::from_iter` as they were deprecated. Use
81   `*::from_non_empty_iter` instead.
83 ## Patch changes
85 - Fix tokenizer of `Block`.
86 - Fix a bug while parsing floating-point numbers.
87 - Reformat with `rustfmt`.
89 # 1.2
91 > Wed 18th Sep 2019
93 ## Deprecations
95 - `NonEmpty::from_iter` and `TranslationUnit::from_iter` are deprecated in favor of
96   `*::from_non_empty_iter`.
98 ## Minor changes
100 - Add binary SPIR-V transpilation. That enables to transpile GLSL directly into a SPIR-V buffer.
101 - Add `NonEmpty::from_non_empty_iter` and `TranslationUnit::from_non_empty_iter`.
103 # 1.1.1
105 > Tue 17th Sep 2019
107 - Update internal code for Rust edition 2018.
109 # 1.1
111 > Tue 30th of July 2019
113 - Add the `ShaderStage` type alias to `TranslationUnit`.
114 - Enhance the front documentation to showcase how to use how to use the crate.
116 # 1.0.2
118 > Tue 23rd of July 2019
120 - Change the description of the project and update documentation.
122 # 1.0.1
124 > Tue 23rd of July 2019
126 - Change the `external_declaration` parser so that it can also accept _GLSL460_. That should be a
127   breaking change because now, _GLSL450_ formatted input accepts feature from _GLSL460_, which
128   shouldn’t be allowed. Nevertheless, the added feature (being able to use semicolons (`;`) on
129   empty lines at top-level) is not really an interesting property and no breakage should happen.
131 # 1.0
133 > Thu 18th of July 2019
135 - Migrate all parsers to [nom-5](https://crates.io/crates/nom/5.0.0).
136 - Improve and add unit and integration tests.
137 - Improve overall documentation.
138 - Enhance some allocation scheme (removed them by using more adapted parsers).
139 - Completely remove the byte (`&[u8]`) parsing. That was a bad idea, for both its impractical
140   aspect and error removing. Parsing is done on string slices now (`&str`).
142 # 0.13.5
144 > Sun 9th of December 2018
146 - Add the SPIR-V transpiler. Currently, it’s feature-gated and *very* experimental. Feel free to
147   try and provide feedback about it.
148 - Add simple accessors for `ParseResult`.
149 - Fix a typo in the documentation of syntax.
150 - Add some unit and integration tests.
151 - Add `Identifier::as_str` and `TypeName::as_str`
153 # 0.13.4
155 > Wed 25nd of November 2018
157 - Add `NonEmpty::push` and `NonEmpty::pop`.
158 - Implement `Deref` and `DerefMut` for `TranslationUnit`.
160 # 0.13.3
162 > Wed 24nd of November 2018
164 - Add `NonEmpty::from_iter` and `TranslationUnit::from_iter`.
165 - Implement `IntoIterator` for `NonEmpty` and `TranslationUnit`.
167 # 0.13.2
169 > Wed 22nd of November 2018
171 - Fix a typo in documentation.
173 # 0.13.1
175 > Wed 22nd of November 2018
177 - Fix a link in documentation.
179 # 0.13
181 > Wed 21st of November 2018
183 - Update/reset hyperlinks in all the documentation for types, traits, methods, etc.
184 - General enhancement of the documentation.
185 - `ExternalDeclaration::new_struct` can now fail. Check the doc for further details.
186 - `NonEmpty`, `Identifier` and `TypeName` and `TranslationUnit` are now plain types and not
187   aliases anymore.
188 - Add AST visitors. Visitors allow for traversing through an AST and on-the-fly mutation,
189   filtering, etc.
190 - The `#define` preprocessor pragma is now supported in a limited form (it can only be used in
191   the global scope).
193 # 0.12
195 > Sun 11th of November 2018
197 - Fix the type of identifier stored in `Block`: it now uses the new encoding for arrayed
198   identifiers.
199 - `Block` parsers update for the arrayd identifier change.
201 # 0.11
203 > Sat 10th of November 2018
205 - Add helper functions to build objects form the `syntax` module. Those are intended to be a
206   simple way to build ASTs out of Rust code instead of parsing.
207 - Enhance the documentation of the `Preprocessor` type.
209 # 0.10.1
211 > Fri 2nd of November 2018
213 - Add some missing implementors of `Parse` for types from `glsl::syntax`.
215 # 0.10
217 > Fri 2nd of November 2018
219 - Hide the `parsers` module. It’s not exposed anymore as it was mostly
220   [nom](https://crates.io/crates/nom) parsers and we don’t like leaking internals.
221 - Introduce the `Parser` trait, acting as an abstraction over the internal parsers. Implementors
222   provide a type-driven parsing experience that is very similar to the one as
223   [FromStr](https://doc.rust-lang.org/std/str/trait.FromStr.html). This change is actually
224   mandatory for the [glsl-quasiquote](https://crates.io/crates/glsl-quasiquote) crate’s `glsl!`
225   proc-macro to allow people use it for any GLSL item (and not only `TranslationUnit`).
226 - Enhance the overall documentation.
228 # 0.9.2
230 > Wed 3rd of October 2018
232  - Fix GLSL transpiled representation of `IVec*`. It was plain wrong.
234 # 0.9.1
236 > Sat 7th of July 2018
238 - Fix unit testing in transpilers.
240 # 0.9
242 > Sat 7th of July 2018
244 - Big cleanup of the module hierarchy.
245 - Enhanced the documentation.
247 # 0.8.1
249 > Sun, 17th of June 2018
251 - Add the `README.md` path to the `Cargo.toml` manifest.
253 # 0.8
255 > Sun 17th of June 2018
257 This version introduces breaking changes because public types used in return positions have changed.
258 These concern only intermediate `nom` functions, so if you do not make a fancy use of this crate,
259 you souldn’t have to worry too much when migrating.
261 - Fix the roundtrip issue with the GLSL writer (precedence wasn’t correctly respected).
262 - Simplify internal code.
263 - Error instead of panicking when parsing overflowing integer literals.
264 - Fix panic trying to parse literals starting with whitespace.
265 - Add fuzzing to find out panics.
267 # 0.7.2
269 > Wed 13th of December 2017
271 - Fix the `show_expr` when the `Expr` is a `Expr::UIntConst`.
273 # 0.7.1
275 > Mon 20th of November 2017
277 - `std::error::Error` is now implemented for `ParseError`.
279 # 0.7
281 > Wed 27th of September 2017
283 - Add support for postfix expressions as function identifiers.
285 # 0.6.5
287 > Mon 4th of September 2017
289 - Fix the formatting of floating values when the fractional part is `0`.
291 # 0.6.4
293 > Mon 4th of September 2017
295 - Fix the output for `show_struct_specifier`.
297 # 0.6.3
299 > Mon 4th of September 2017
301 - Fix the output for `show_struct_specifier`.
303 # 0.6.2
305 > Mon 4th of September 2017
307 - Remove a warning.
309 # 0.6.1
311 > Mon 4th of September 2017
313 - Fix `show_struct_specifier`.
315 # 0.6
317 > Fri 1st of September 2017
319 - The `TypeSpecifier` type was wrong as it didn’t carry any `ArraySpecifier` information while the
320   GLSL specification’s grammar about type specifiers states they should. Fixed.
322 # 0.5
324 > Mon 7th of August 2017
326 - The `parse` and `parse_str` functions now take as second argument the parser to run. This enables
327   using those functions and all the neat logic the wrap in dependent projects.
329 # 0.4.2
331 > Fri 4th of August 2017
333 - A GLSL writer is now available.
334 - Some parsers yield non-empty list of syntax trees. Those had the incorrect `Vec` type. They were
335   replaced by `NonEmpty`, which is an alias to `Vec`, but carry the semantic that it has at least
336   one element in it.
338 # 0.4.1
340 > Thu 3rd of August 2017
342 - Uni/multi-line comments are now supported.
344 # 0.4
346 > Wed 2nd of August 2017
348 - The `Declaration::Block` variant was refactored for a better usage.
349 - Dot field selections and, in a mory general way, postfix expressions completely fixed. The
350   `syntax` module was altered to make it easier to work with dot field selection. Also related,
351   the function identifier syntax is now isomorphic to an identifier.
353 # 0.3.1
355 > Tue 1st of August 2017
357 - Fix the `preprocessor` parser so that it eats surrounding blanks.
359 # 0.3
361 > Mon 31st of July 2017
363 - Add a very minimalistic yet working preprocessor. It parses `#version` and `#extension`
364   commands. Those have to be declared at the top of your file, even though this implementation
365   accepts them at any place an external declaration could be defined. Feel free to submit a PR
366   if you want to change that behavior, I don’t really mind.
367 - Enhance the runtime error reporting. It’s not perfect, but it’s way better than before!
368 - `void` is now recognized as `TypeSpecifier::Void` instead of the erroneous
369   `TypeSpecifier::TypeName("void")`.
371 # 0.2.2
373 > Mon 31st of July 2017
375 - The `layout` parser had a nasty bug that would treat a list of key-value pairs as an expression
376   assignment. This was fixed and it now treats it as a list of pairs of identifier associated with a
377   possible constant expression.
378 - The `StructFieldSpecifier` type and its associated parser were wrong. Was missing:
379   + the type qualifier
380   + for each identifier defined in the field specifier, its optional array specifier, as in
381     `float foo[3];` or `vec3 bar[];` for unsized ones.
383 # 0.2.1
385 > Sun 30th of July 2017
387 - More documentation to help people to get their feet wet.
389 # 0.2
391 > Sat 29th of July 2017
393 - The whole parsing API is public.
395 # 0.1
397 - Initial revision.