-
Notifications
You must be signed in to change notification settings - Fork 37
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
Replace Webpack with Vite #1728
Conversation
This is a workaround so that `yarn serve` works like how it did in COSMOS 5. Eventually, we should try to figure out why the vite dev server isn't working how it's supposed to
This was effectively a polyfil for async js code. I removed it from index.html a little bit ago but forgot to remove it everywhere else
…ts. Make main.js default
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1728 +/- ##
==========================================
- Coverage 76.30% 76.28% -0.03%
==========================================
Files 603 602 -1
Lines 46103 46088 -15
Branches 844 844
==========================================
- Hits 35180 35157 -23
- Misses 10827 10834 +7
- Partials 96 97 +1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
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.
Mostly questions and clarifications. Look forward to a faster build and better support going foward with vite!
@@ -17,6 +17,10 @@ const config = { | |||
tagline: 'OpenC3 COSMOS Documentation', | |||
favicon: 'img/favicon.png', | |||
|
|||
future: { | |||
experimental_faster: true, | |||
}, |
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 makes the build faster?
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.
Yep. See the Docusaurus 3.6 release notes.
@@ -52,7 +52,7 @@ GEMS="$SCRIPT_DIR/../../../openc3-cosmos-init/plugins/gems/" | |||
OPENC3_RELEASE_VERSION=5.21.0-beta0 | |||
|
|||
mkdir -p ${GEMS} | |||
cd ${PLUGINS}openc3-tool-base && yarn install && yarn run build && rake build VERSION=${OPENC3_RELEASE_VERSION} && mv *.gem ${GEMS} | |||
cd ${PLUGINS}packages/openc3-tool-base && yarn run build && rake build VERSION=${OPENC3_RELEASE_VERSION} && mv *.gem ${GEMS} |
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.
Are we planning on deleting this hostinstall example?
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.
I thought you already did that?
If not, then yes I want that removed for the 6.0 release.
elsif item['data_type'] == 'STRING' | ||
default = "'#{item['default']}'" || '' | ||
default = "'#{item['default']}'" |
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.
Was this to address a specific issue with BLOCK vs STRING?
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.
That or never did anything so I removed it.
"@openc3/tool-common": "5.21.0-beta0", | ||
"vue": "3.5.4", | ||
"vuetify": "3.7.1" | ||
"@openc3/tool-common": "5.21.0-beta0" |
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.
vue and vuetify go away because they're externals now?
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.
Yes.
resolve: { | ||
extensions: [...DEFAULT_EXTENSIONS, '.vue'], // not recommended but saves us from having to change every SFC import | ||
}, | ||
}) |
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.
Do we need to generate this vite config file now?
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.
Yes.
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.
We should make a note to update all the templates to match the new Vue, Vuetify, and Vite syntax
|
||
defineCustomElements() | ||
|
||
Object.getPrototypeOf(System).firstGlobalProp = true; |
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.
What does this do?
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.
I don't remember the technical details, but it has to do with making systemjs work with Vue 3 since there's no global Vue
anymore like there was with Vue 2. Vue 3 is just a module import
}, | ||
], | ||
}) | ||
|
||
router.beforeEach(({ path }) => { | ||
if (['/', '/tools', '/tools/'].includes(path)) { | ||
navigateToUrl(DEFAULT_TOOL_PATH) | ||
singleSpaNavigate(DEFAULT_TOOL_PATH) |
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.
AppNav.vue does a bunch of navigateToUrl
... does it also need to change to singleSpaNavigate
?
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.
As far as I understand, they are interchangeable. It's just navigateToUrl
has to be imported while singleSpaNavigate
is just added as a global via the window
object. I had changed them from singleSpaNavigate to navigateToUrl during the initial vue 3 migration stuff (while I was trying to get single-spa actually working), but that change should just be vestigial by now.
@@ -82,3 +82,15 @@ TOOL: | |||
required: false | |||
description: Regex to match against filenames. If match, then no ERB processing | |||
values: .+ | |||
IMPORT_MAP_ITEM: | |||
summary: Add an item to the import map |
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.
Can I get a description
with a little more information about when and why this is needed?
"Needed for custom tools because ..."
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 isn't currently needed. It will be needed when we go to a single import map to support ESM modules, but for now its just a neato feature that noone will use.
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.
Ok ... let's remember to update the docs when we get to that point!
@@ -138,6 +139,9 @@ def __init__( | |||
self.env = {} if env is None else env | |||
self.container = container | |||
self.prefix = prefix | |||
self.shard = shard | |||
if self.shard is None: | |||
self.shard = 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.
Does this shard stuff need migrations?
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.
No. It is upgrade safe.
parser, | ||
f"Unknown keyword and parameters for Microservice: {keyword} {' '.join(parameters)}", | ||
) | ||
return None |
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.
Only the Ruby code processes the microservice model via the plugin_model. This must have been during my port everything to Python activity!
|
No description provided.