-
-
Notifications
You must be signed in to change notification settings - Fork 6
Fix v2 build papercuts #26
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -88,6 +88,7 @@ public function copyToBuildDirectory(): bool | |
| } | ||
|
|
||
| $this->keepRequiredDirectories(); | ||
| $this->keepLivewireDispatcher(); | ||
|
|
||
| return true; | ||
| } | ||
|
|
@@ -106,4 +107,17 @@ private function keepRequiredDirectories() | |
| $filesystem->dumpFile("{$buildPath}/storage/app/public/_native.json", '{}'); | ||
| $filesystem->dumpFile("{$buildPath}/storage/logs/_native.json", '{}'); | ||
| } | ||
|
|
||
| private function keepLivewireDispatcher() | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Just a suggestion, but to avoid a method for every file, perhaps this could be named There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for the suggestion I agree with you there. That's what I did at first. My perspective changed a bit; this moving piece should not even exist in the first place. So I took it out into it's own method so I can rip it out more easily later on. I hope to update the copying logic a so I can simply add this file using the glob patterns (exclude_list) instead. But I thought that change is a bit too risky to do as a patch right now. What do you think? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think with good testing it's safe to do. But if this is a quick patch-release to resolve blocking issues now, I'm okay with it. I definitely think this should be revisited and it sounds like you have a plan to do so. All good from me. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes 100% I want to revisit this. This is a bit of a thorn in my eye, but should fix the issue reliably for people asap. |
||
| { | ||
| // This is a bit leaky, since we only need this for electron, not potential other drivers | ||
| // We'll find a better place for it when we add more drivers. | ||
| $dispatcherPath = 'vendor/nativephp/desktop/resources/electron/electron-plugin/src/preload/livewire-dispatcher.js'; | ||
| $filesystem = new Filesystem; | ||
|
|
||
| $filesystem->copy( | ||
| $this->sourcePath($dispatcherPath), | ||
| $this->buildPath("app/{$dispatcherPath}") | ||
| ); | ||
| } | ||
| } | ||
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.
To maintain the version numbering, should this be
2.0.0?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.
these values are patched on an
native:run&native:build. So this is basically only for the very first timenative:installruns in a fresh project.You're right it should be
2.0.1. But since v1 this was never updated and was always out of sync with the real version. Since it's only shown one time i figured this was fine and we can forget about itThere 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.
Scratch that, it's displayed after initial install too. My bad, It only updates in the cli if you also run npm update.
However I think it's fine still. I'm not keen on updating a single file on every new version