[WIP] Add watch and update capability for hot reloading to Builder#2656
Open
janbiedermann wants to merge 1 commit intoopal:masterfrom
Open
[WIP] Add watch and update capability for hot reloading to Builder#2656janbiedermann wants to merge 1 commit intoopal:masterfrom
janbiedermann wants to merge 1 commit intoopal:masterfrom
Conversation
d701111 to
94f98ea
Compare
94f98ea to
d196c3b
Compare
hmdne
reviewed
May 6, 2024
hmdne
reviewed
May 6, 2024
d196c3b to
2535a0b
Compare
2535a0b to
a121f36
Compare
Member
Author
|
Also added specs, which fail, because i came to a point, where more changes are required to the assets. For example in case of require_tree and a added file, its not enough to just add the new asset to the set, it must also be added to the outer asset as required asset. Thus delegating the detection of a new file to the outer asset may be appropriate. Work in progress. |
31aaea1 to
9078413
Compare
95f2141 to
637ab6e
Compare
This file contains hidden or 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
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.
Adds 2 methods to Builder:
Builder#watch(&block)
loops and watches for changes, calls block with block.call(builder, changes)
where changes is a Hash like: { added: [], modified: [], removed: [] }
if a error occured, changes has another key :error which contains the exception
Builder#update
checks for changes and updates itself, returns the changes like watch above
Builder delegates the actual update to the processed asset, which is a Processor instance, via Processor#update
This PR also updates compiler runner to use Builder#watch.
Although CI is green, i have not tested it yet. I will update #2655 to use this PR and test using that.