-
-
Notifications
You must be signed in to change notification settings - Fork 98
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
Remove spectral or fix underlying dependencies #857
Comments
Hi @jonaslagoni, I can concur. Took significant time to get around all the spectral issues and integrate https://github.com/asyncapi/parser-js/releases/tag/v3.0.0-next-major-spec.2 into bundles. Eventually managed to get it working but increased the bundle sizes significantly as the entire spectral toolchain now gets bundled. I was immediately looking for a way how to remove spectral by the bundling process. I just need to parse the AsyncAPI document and pass the parsed document to the asyncapi-react renderer. I don't need any validation at all. Either the parser should parse the document and provide it or fails (with reason). IMHO integrating the major linting library (that's difficult to bundle) into the parser without opting out from it is not the best situation. Would it be possible to create a new entry point inside the npm package that would just do the pure parsing without spectral? |
Its a great question @char0n, maybe is the short answer 😅 Problem is its currently tied to reference resolvement as well, so might need a little re-engeering, feel free to propose it 👍 But yea, definitely need to be addressed at some point... |
Because of #761 for me Spectral should go away. Before we had custom validation code for some extra spec stuff (that ajv could not cover) and it was working. Code was not the best but at least you could control it. Maybe now as Stoplight is part of SmartBear the development experience with Spectral will increase @char0n 😉 😄 |
This issue has been automatically marked as stale because it has not had recent activity 😴 It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation. There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model. Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here. Thank you for your patience ❤️ |
I have faced this issue as well (nimma within the ref resolver) when trying to use our parser in a Deno env through Netlify's Edge functions. |
This issue has been automatically marked as stale because it has not had recent activity 😴 It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation. There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model. Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here. Thank you for your patience ❤️ |
This will also make parser to work in cloudflare workers. it looks like today it doesn't as spectral is using ajv and ajv is using code from string via |
This issue has been automatically marked as stale because it has not had recent activity 😴 It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation. There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model. Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here. Thank you for your patience ❤️ |
Reason/Context
There are way too many issues with webpack and jest configuration when we upgrade libraries to use the new parser versions and for dependent libraries to do the same for it to make sense to continue using it IMO. I have spend way to many hours fixing these problems and encountering new edge cases.
What it falls back to are https://github.com/P0lip/nimma (that spectral depend on) that simply don't work out the box with our setups and require workaround in every library that integrate the parser and who ever integrate with those. It's just a continuous requirement to fix it all the time.
That is why I am suggesting that we either pool some resources together to fix the underlying library or remove spectral completely and each user can decide to use it on their own terms.
By removing Spectral we are going to miss out on some convenient validation stuff, but nothing that will mean the library cant function as needed. And the user can still decide to use it on their own term before using the parser, for example in Studio.
And for fixing the underlying library, I simply have no idea how easy it is to achieve especially considering last time nimma was updated was 2 years ago.
Thats why I am more in favor of removing the library entirely for now.
The text was updated successfully, but these errors were encountered: