Commit graph

17 commits

Author SHA1 Message Date
Olivier Goffart
a8bc254dd3 Fixes loop detection involving sub components and two ways binding
The original binding analysis code was considering that all the sub components
were inlined. But when this is not the case, we need to re-analyze each
sub component within their parent.

We also need to take care of reverse aliases

Will cause a .60 compile time binding loop error instead of a
runtime recursion panic in code like issue #772
2022-01-17 19:48:37 +01:00
Tobias Hunger
bfca0e3573 Mass update copyright messages to be more REUSE compliant 2021-12-22 10:06:12 +01:00
Olivier Goffart
b8cc59afca Fix panic when compiling a property that references itself
Fixes #737
2021-12-13 15:00:19 +01:00
Olivier Goffart
dd3fa1c221 Make the BindingMap hold RefCell of the BindingExpression
This will allow later to be able to operate on the binding despite the
element is borrowed.

Since the Binding itself is in a RefCell, the analysis don't need to
be anymore.
To do this change, a small change in the binding_analysis logic was required
which means that we will now detect binding loop if a binding was causing
two binding loop. (before, only one binding loop was detected)
2021-11-11 11:14:59 +01:00
Olivier Goffart
8622dcb910 Do the default_geometry pass without inlining 2021-10-28 15:52:29 +02:00
Tobias Hunger
aea4ecca99 Apply pre-commit hooks to all files 2021-08-17 22:38:16 +02:00
Olivier Goffart
c25538c982 Normalize identifiers to - instead of _
As a result
 - The error messages will now show the error with `-` instead of `_`
 - The LSP will auto-complete with -
 - The interpreter's list of properties will list the property with '-'
   (but we made the change so that set_property, get_property, and so on
   work also if passed a '-')
2021-08-10 22:21:01 +02:00
Olivier Goffart
13bd828b96 Update license date 2021-07-02 15:55:54 +02:00
Tobias Hunger
13d7f5e7bd Janitor: Fix typos in comments and user-facing strings
Also adapt tests for error messages containing the fixed strings.

No behavior change is intended!
2021-06-28 08:32:25 +02:00
Olivier Goffart
fb7050e3e6 Properly detect layout loop involving images 2021-06-21 12:33:15 +02:00
Olivier Goffart
a97bcd5ae1 Use BTreeMap unstead of HashMap to store the bindings
Because the order is important to keep deterministic error and output
2021-06-18 21:47:00 +02:00
Olivier Goffart
19cef07d96 Properly detect loop in layout
cc #257
2021-06-18 20:30:14 +02:00
Olivier Goffart
deaa0fddb0 WIP layout: split vertical and horizontal cache
Split the vertical and horizontal pass into different property cache
This will allow to implement "height for with"

This patch does not port the Rust or C++ binding yet
2021-06-16 15:14:07 +02:00
Olivier Goffart
ee00c9eb92 Rename maximum- and minimum- properties to max- and min-
Issue #259
2021-06-14 10:28:30 +02:00
Olivier Goffart
73c396ed7a Report binding loops for layouts 2021-05-18 12:25:19 +02:00
Olivier Goffart
4824d43c50 Fix binding loop detection involving states 2021-05-18 10:52:05 +02:00
Olivier Goffart
3548c48bff Detect binding loop at compile-time
FIXME: i've currently disabled layout from the detection because it reports
error in our current examples
2021-05-15 15:49:27 +02:00