website
website copied to clipboard
Update Modelina dependency to use `next`
Reason/Context
Currently, Modelina is not compatible with website environments, however, the next
version is. Therefore to fix this issue we need to upgrade the version from "@asyncapi/modelina": "^0.49.0",
to "@asyncapi/modelina": "^1.0.0-next.6",
.
I don't think we have to make any other adjustments to the code for it to work, but I might be mistaken! If I am mistaken then feel free to try and solve the issues yourself, you can about the breaking changes here: https://github.com/asyncapi/modelina/blob/next/docs/migrations/version-0-to-1.md
Otherwise, feel free to ping me and I will help figure out what is needed to make it work π
Can someone label this as a good first issue? π
@jonaslagoni fixes here are still not enough. Cause if you just switch here to next
releases, then still modelina will push main releases whenever they show up.
in modelina in next
branch you have bump workflow that reacts on master only -> https://github.com/asyncapi/modelina/blob/next/.github/workflows/bump.yml which is fine, if you do not want RC releases bumped anywhere automatically. It can stay like this if you do not want every single RC in website. But still in master
branch we would need something like https://github.com/asyncapi/asyncapi-react/blob/master/.github/workflows/bump.yml#L34. You know what I mean?
Riiight makes sense π
So this is still relevant as I see it cause we need to update it. Once the pre-release is out we can switch over no problem, and we don't necessarily have to bump it, so no need to change the workflow.
Regarding the bump workflow, if the website uses the pre-release build the bump workflow should not bump the website when new changes on the master branch come out, but it does as I understand right? Or does it correctly handle this?
hi @jonaslagoni can I work on this issue
Of course, no need to ask for permission π
hi @jonaslagoni can I work on this issue?
hi @jonaslagoni can I work on this issue?
hey its already mention you can work if there is no pr no need to ask
so do I just have to update the dependencies?
@jonaslagoni @derberg after updating the dependency I am getting webpack errors during build process The Full Error message is as below :
./node_modules/create-require/create-require.js
Module not found: Can't resolve 'module' in '/home/deep/AsyncAPI-Website/node_modules/create-require'
Import trace for requested module:
./node_modules/create-require/create-require.js
./node_modules/ts-node/dist/util.js
./node_modules/ts-node/dist/index.js
./node_modules/ts-node/register/index.js
./node_modules/typescript-json-schema/dist/typescript-json-schema.js
./node_modules/@asyncapi/modelina/lib/esm/processors/TypeScriptInputProcessor.js
./node_modules/@asyncapi/modelina/lib/esm/processors/index.js
./node_modules/@asyncapi/modelina/lib/esm/index.js
./components/modelina/JavaGenerator.js
./node_modules/ts-node/dist-raw/node-internal-modules-cjs-helpers.js
Module not found: Can't resolve 'module' in '/home/deep/AsyncAPI-Website/node_modules/ts-node/dist-raw'
Import trace for requested module:
./node_modules/ts-node/dist-raw/node-internal-modules-cjs-helpers.js
./node_modules/ts-node/dist-raw/node-internal-modules-cjs-loader.js
./node_modules/ts-node/dist/index.js
./node_modules/ts-node/register/index.js
./node_modules/typescript-json-schema/dist/typescript-json-schema.js
./node_modules/@asyncapi/modelina/lib/esm/processors/TypeScriptInputProcessor.js
./node_modules/@asyncapi/modelina/lib/esm/processors/index.js
./node_modules/@asyncapi/modelina/lib/esm/index.js
./components/modelina/JavaGenerator.js
./node_modules/ts-node/dist-raw/node-internal-modules-cjs-loader.js
Module not found: Can't resolve 'module' in '/home/deep/AsyncAPI-Website/node_modules/ts-node/dist-raw'
Import trace for requested module:
./node_modules/ts-node/dist-raw/node-internal-modules-cjs-loader.js
./node_modules/ts-node/dist/index.js
./node_modules/ts-node/register/index.js
./node_modules/typescript-json-schema/dist/typescript-json-schema.js
./node_modules/@asyncapi/modelina/lib/esm/processors/TypeScriptInputProcessor.js
./node_modules/@asyncapi/modelina/lib/esm/processors/index.js
./node_modules/@asyncapi/modelina/lib/esm/index.js
./components/modelina/JavaGenerator.js
./node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js
Module not found: Can't resolve 'module' in '/home/deep/AsyncAPI-Website/node_modules/ts-node/dist-raw'
Import trace for requested module:
./node_modules/ts-node/dist-raw/node-internal-modules-esm-resolve.js
./node_modules/ts-node/dist/index.js
./node_modules/ts-node/register/index.js
./node_modules/typescript-json-schema/dist/typescript-json-schema.js
./node_modules/@asyncapi/modelina/lib/esm/processors/TypeScriptInputProcessor.js
./node_modules/@asyncapi/modelina/lib/esm/processors/index.js
./node_modules/@asyncapi/modelina/lib/esm/index.js
./components/modelina/JavaGenerator.js
./node_modules/ts-node/dist-raw/node-internal-repl-await.js
Module not found: Can't resolve 'repl' in '/home/deep/AsyncAPI-Website/node_modules/ts-node/dist-raw'
Import trace for requested module:
./node_modules/ts-node/dist-raw/node-internal-repl-await.js
./node_modules/ts-node/dist/repl.js
./node_modules/ts-node/dist/index.js
./node_modules/ts-node/register/index.js
./node_modules/typescript-json-schema/dist/typescript-json-schema.js
./node_modules/@asyncapi/modelina/lib/esm/processors/TypeScriptInputProcessor.js
./node_modules/@asyncapi/modelina/lib/esm/processors/index.js
./node_modules/@asyncapi/modelina/lib/esm/index.js
./components/modelina/JavaGenerator.js
> Build failed because of webpack errors
Please advice
@Anurag607 please wait, we still need to clarify a bit
@jonaslagoni ππΌ
So this is still relevant as I see it cause we need to update it. Once the pre-release is out we can switch over no problem, and we don't necessarily have to bump it, so no need to change the workflow.
what do you mean? bump will happen anyway
using fake release number:
- no we have 0.1
- you want to manually switch to RC-1.0
- bump workflow, when 0.2 in modelina is released, will bump modelina in website to 0.2
it is not so easy as just updating dependency. Next
simply doesn't work in website - https://github.com/asyncapi/website/pull/1132 -> https://app.netlify.com/sites/asyncapi-website/deploys/6386a45b5377a1000834280e. So changes done to code to make next
work, will fail again with master
release update. Does it make sense?
Regarding the bump workflow, if the website uses the pre-release build the bump workflow should not bump the website when new changes on the master branch come out, but it does as I understand right? Or does it correctly handle this?
I think I already answered this one, but probably different PR π€ no, dependency bumper does not have the capability to understand if you want to only bump RC or not RC, or map branch names
We discussed this in the CLI repo.
I still don't see how we cannot update the version here π Probably time to disable the bump workflow for Modelina alongside it.
@Anurag607 did you try to import the cjs
part from ('@asyncapi/modelina/lib/cjs')
π€?
I still don't see how we cannot update the version here
Scenario:
- you created this issue on 15th of September.
- so you manually set modelina version to latest RC v1.0.0-next.6
- automatically
next.7
will never be added as innext
branch workflow listens to master only https://github.com/asyncapi/modelina/blob/next/.github/workflows/bump.yml - but then a day later, modelina in website will be changed to v0.59.6
- but it will actually not be updated as modelina do not work with website https://github.com/asyncapi/website/pull/706
Probably time to disable the bump workflow for Modelina alongside it.
if modelina maintainers wanna disable it, go for it. Just remember that you will have to manually update it in all the other projects that use it.
if modelina maintainers wanna disable it, go for it. Just remember that you will have to manually update it in all the other projects that use it.
Ahh, yea that's too much manual work tbh, with not no clear value created.
@jonaslagoni @derberg sorry for the late responseπ . But I tried manually changing the import sources in all the five language generator files but the error wasn't resolved. I have checked that the import is actually working by creating a separate file and importing it their and logging the results.
@jonaslagoni as I wrote in https://asyncapi.slack.com/archives/CQVJXFNQL/p1674040900585549 you can now freely modify bump.yml
worklow as it won't get global updates until you explicitly configure it
@jonaslagoni since next
is not a thing anymore, I close it π