-
Notifications
You must be signed in to change notification settings - Fork 601
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
refactor: remove hard dependency of DI on FASTElement #6280
Merged
chrisdholt
merged 7 commits into
master
from
users/eisenbergeffect/remove-de-dep-from-di
Aug 16, 2022
Merged
refactor: remove hard dependency of DI on FASTElement #6280
chrisdholt
merged 7 commits into
master
from
users/eisenbergeffect/remove-de-dep-from-di
Aug 16, 2022
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
📊 Tachometer Benchmark ResultsSummaryclickTrigger10x
create10k
createDelete5x
runFile1k
update10th
usedJSHeapSize
Resultsobservable-runFile1k
runFile1k
usedJSHeapSize
render-create10k
create10k
usedJSHeapSize
render-createDelete5x
createDelete5x
usedJSHeapSize
render-update10th
update10th
usedJSHeapSize
repeat-basic-splice-loopCount=1000&itemCount=1000&deleteCount=10&addCount=10
clickTrigger10x
usedJSHeapSize
repeat-nested-push-loopCount=200&itemCount=200
clickTrigger10x
usedJSHeapSize
repeat-nested-reverse-loopCount=200&itemCount=200
clickTrigger10x
usedJSHeapSize
repeat-nested-shift-loopCount=200&itemCount=200
clickTrigger10x
usedJSHeapSize
repeat-nested-unshift-loopCount=200&itemCount=200&addCount=1
clickTrigger10x
usedJSHeapSize
|
change/@microsoft-fast-element-953ae13a-b331-48b2-b410-0881b9fcfce2.json
Outdated
Show resolved
Hide resolved
nicholasrice
approved these changes
Aug 15, 2022
Co-authored-by: Nicholas Rice <3213292+nicholasrice@users.noreply.github.com>
robarbms
approved these changes
Aug 16, 2022
…dep-from-di' into users/eisenbergeffect/remove-de-dep-from-di
chrisdholt
approved these changes
Aug 16, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is great, thanks @EisenbergEffect
janechu
pushed a commit
that referenced
this pull request
Jun 10, 2024
* refactor: remove dependency of DI on FASTElement * feat: throw if attempting to respect DOM connect without a FASTElement * Change files * fix change file Co-authored-by: Nicholas Rice <3213292+nicholasrice@users.noreply.github.com> * chore: fix prettier missing comma in enum Co-authored-by: EisenbergEffect <roeisenb@microsoft.com> Co-authored-by: Nicholas Rice <3213292+nicholasrice@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Pull Request
📖 Description
This PR removes the import of
FASTElement
from the dependency injection code so that users of the DI system can tree-shake out the rest ofFASTElement
.🎫 Issues
👩💻 Reviewer Notes
The import of
FASTElement
was removed to enable non-FASTElement
users to use the dependency injection system without needing to pull in all the code forFASTElement
. The DI container only had one small feature that was dependent on this for a single type check. The new code simply checks for the property it requires rather than doing ainstanceof
. If the needed$fastController
property isn't present, a detailed error is now thrown.📑 Test Plan
This was an internal refactor. All existing tests continue to pass.
✅ Checklist
General
$ yarn change
⏭ Next Steps
Not related to this feature, but also within DI, I'm researching to see whether it would be possible to add a
getAsync
API so that missing dependencies in a dependency resolution tree could be asynchronously provided.