-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: compiler can read metadata without resolving values #434
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
馃 Changeset detectedLatest commit: 40017c3 The changes in this PR will be included in the next version bump. This PR includes changesets to release 17 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
csansoon
force-pushed
the
feature/fast-config-compiler
branch
from
May 16, 2024 16:46
c9eadc8
to
20e32cb
Compare
csansoon
force-pushed
the
feature/fast-config-compiler
branch
7 times, most recently
from
May 17, 2024 15:10
cd7c7f6
to
d2fe6b9
Compare
csansoon
changed the title
Feature/fast config compiler
Feature: compiler can read metadata without resolving values
May 17, 2024
csansoon
force-pushed
the
feature/fast-config-compiler
branch
from
May 17, 2024 15:19
d2fe6b9
to
e6a3b96
Compare
csansoon
changed the base branch from
canary
to
fix/compiler-can-run-methods-from-scoped-variables-canary
May 17, 2024 15:20
csansoon
force-pushed
the
feature/fast-config-compiler
branch
2 times, most recently
from
May 17, 2024 15:23
dd54722
to
79e3096
Compare
csansoon
force-pushed
the
feature/fast-config-compiler
branch
2 times, most recently
from
May 21, 2024 08:48
bf001cd
to
9f64e4f
Compare
csansoon
changed the base branch from
fix/compiler-can-run-methods-from-scoped-variables-canary
to
restructured-compiler-logic
May 21, 2024 08:48
csansoon
force-pushed
the
feature/fast-config-compiler
branch
5 times, most recently
from
May 21, 2024 10:58
a9391b0
to
5099d40
Compare
4 tasks
csansoon
force-pushed
the
restructured-compiler-logic
branch
2 times, most recently
from
May 22, 2024 12:07
c8a9d19
to
2eb5531
Compare
csansoon
force-pushed
the
feature/fast-config-compiler
branch
from
May 22, 2024 12:14
5099d40
to
c238bea
Compare
csansoon
force-pushed
the
restructured-compiler-logic
branch
2 times, most recently
from
May 22, 2024 12:17
cd48840
to
f155f00
Compare
csansoon
force-pushed
the
feature/fast-config-compiler
branch
from
May 22, 2024 12:29
c238bea
to
72c954d
Compare
csansoon
force-pushed
the
restructured-compiler-logic
branch
from
May 22, 2024 12:30
f155f00
to
0931006
Compare
csansoon
force-pushed
the
feature/fast-config-compiler
branch
3 times, most recently
from
May 22, 2024 12:34
dce3aa5
to
f055e9f
Compare
csansoon
force-pushed
the
feature/fast-config-compiler
branch
from
May 24, 2024 10:01
f055e9f
to
40017c3
Compare
andresgutgon
approved these changes
May 27, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Describe your changes
Some procedures require extracting metadata from the query, like the defined configuration or knowing which functions are being used, without actually having to resolve the query.
The current way to do this is just compiling the query, which will return some additional metadata along with other compiled output. The problem with this approach is that compiling a query is not always free, as some queries may use
runQuery
. This function is executed in compile time, since we need the result to be able to resolve other parts of the query. Since we need to get some of the query metadata instantly in some cases, we cannot depend on running queries just to read its configs.To fix this issue, I have divided the current compilation process in two independent functions:
compile
andreadMetadata
:compile
resolves all variables, parameters and functions in a query, which are dynamic and dependent on context and may take some time depending on its content.readMetadata
in the other hand, returns information that is static in the query, like the defined configuration or the methods that are being called inside of it.In order to read something as "metadata", it must be static and not depend on other values, parameters or functions resolved during run-time. Since I want the config to be part of the query metadata, I had to add these restrictions to the
{@config}
tag:{#if}
or{#each}
blocks.Checklist before requesting a review
馃殏 TRENECITO.
馃殙 Previous station: #439
馃殙 Next station: #444