Skip to content
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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Features/fuse #10090

Merged
merged 20 commits into from
Mar 14, 2024
Merged

Features/fuse #10090

merged 20 commits into from
Mar 14, 2024

Conversation

chsienki
Copy link
Contributor

Use runtime code generation for the IDE when under feature flag.

chsienki and others added 18 commits January 11, 2024 15:12
- Added config flag
- Set flag to default to true in IDE scenarios
- When flag is set, return a runtime doc, even if a design time one is requested
…#9863)

* Ensure we include the line count and end char index in remapped spans
* Make the source span in tests have non-default values to ensure they get mapped too
* Add missing source mappings for runtime documents
* Update baselines
* Ensure we throw if the mapping from source to generated code doesn't match
Update @page directives to include #line and source mapping information in runtime generation.
Updates tooling to get the value LanguageServerFeatureOptions options and pass into the compiler
* Track if a using statement has an explicit semicolon
Using statements can have an optional semicolon, which is added automatically if the user doesn't write one.
Track if the user explicitly wrote the semicolon so we know where the user written code starts and ends.

* Add missing source mappings for runtime usings
Write out the semicolon if the user didn't explicitly provide it

* Correctly emit enhanced line directives when there is no offset
An offset of 0 is represented by the absence of an offset, not a literal 0. Don't write an offset at all if zero is requested.

* Update baselines and add tests
* Use enhanced line pragmas for csharp tokens
- Ensure we build a pragma around each individual token, rather than the overall node
- Refactor writer to share child rendering code
- Move add padding call to line pragma builder 

* Assert that pragmas have matching source mappings, and are enhanced.

* Update tests with positions and hardcoded outputs

* Update source generator test

* Update baselines
* Track namespace locations:
- Track the user written portion of the namespace
- When there is a user written portion, build a line pragma around it

* Update baselines

---------

Co-authored-by: Jan Jones <jan.jones.cz@gmail.com>
* Ensure we always write a mapping when emitting a line pragma
* Add assert to check that we always write an enhanced line in runtime
* Track component inject user code parts
* Add component inject baseline test
* Update @Inject directives for extensions
* Add required shim parts for MVC1x
* Update baselines
Merges main into the fuse branch
azure-pipelines.yml Outdated Show resolved Hide resolved
@chsienki chsienki merged commit f5bc8f5 into main Mar 14, 2024
12 checks passed
@chsienki chsienki deleted the features/fuse branch March 14, 2024 17:48
@dotnet-policy-service dotnet-policy-service bot added this to the Next milestone Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants