raml-org / raml-js-parser-2

(deprecated)
Other
138 stars 53 forks source link

Where is the unbundled source? #8

Closed baig closed 8 years ago

sichvoge commented 8 years ago

Currently behind some really thick doors :) We will open-source it as soon as possible so people can directly contribute via PRs. However, right now we stabilising few things and clean up the source. Please raise any issues here for tracking purpose. Thank you!

shlomiassaf commented 8 years ago

I think you should publish it ASAP, the bundle is useless. I believe your wrote it in TS with webpack, it will help seeing the code.

Anyway, publish it and change it to alpha, this way you dont need to hide anything :)

aldonline commented 8 years ago

@shlomiassaf the parsers are actually generated from a larger project ( which also generates the Java parser ). In order for us to publish this code it needs to be modularized and extracted - which is what @sichvoge meant by "cleaning up the source". Most development effort now is on finalizing the RAML1 RC. Which is precisely why these parsers were published along with the Api Workbench: to allow users to test the various new features and provide feedback. The generated code approach helps prevent any divergence of the various parser implementations at this point - a small tradeoff for a big win.

shlomiassaf commented 8 years ago

@aldonline Thanks for the update.

I`ll try squeeze in another thing, related to the spec... I loved the concept of Type Fragments, I noticed that the DataType fragment does not have the ability to include libraries via the "uses" keyword.

This means that a DataType fragments can only import via !include ... This limits the usage a lot, where is the place to ask for such additions?

Thanks.

wookiehangover commented 8 years ago

Bump on this issue... I'm really hesitant to rely on a project that's only shipping 47,000 lines of compiled output

sichvoge commented 8 years ago

@wookiehangover, so far the situation did not change that the code is generated out of a much bigger project that does not only generate the JS parser, but much more we are working on. Most of the development work currently is to stabilise the parser and alongside that, making changes according to feedback from the community which use the API Workbench and to the specification that will be introduced in 1.0. Nevertheless, there are plans to open source the code together with the final release of RAML 1.0 (current version is RC1), but we need to do some preparation that will lead into a bigger goal first.

I am really sorry if that creates any inconvenience, and all I can say is that we can hear everybody and we try to find the best way for everybody.

BTW as it is currently generated to preserve some level of consistency between the tools we are working on, publishing in an alpha branch does not help as well. To do that, again, we need some preparation here at our side.

Summary: Not saying we don't do it, but please give us some more time and testing.

nicbet commented 8 years ago

I'm with @wookiehangover on this. While I respect that you want to keep the competitive advantage of your 'value added' code closed source, the quasi-reference implementation of the Parser for RAML 1.0 Spec really needs to be open source to foster and accelerate adoption by a broader audience.

As it stands right now it's really hard to make an argument to move from Swagger to RAML when the core parser that the vast majority of tooling depends on, is closed to the public.

For instance, I've spent the past few days modifying the raml2html/ram2html npm module to support the new 1.0 spec parser, which dead-ended in problems with toJSON() serialization of Resource type nodes. I went looking for the parser code and was hit with a 1.6MB single bundle js. Ouch.

sichvoge commented 8 years ago

We are fully with you and the plan is to do that as soon as the spec will be finally released. With regards to the raml2html and your dead-ended problems, afaik the toJSON() was never intended to be used in a way that you might use it. It was initial just for developers to debug. @ddenisenko might be able to say more about it and can help you with any problems you are currently facing.

So, please everyone bear with us with open sourcing the parser until RAML 1.0 has been finally fully released. After that, we might take a bit to clean up code and extract the parser out of where it is right now.

sichvoge commented 8 years ago

@timofonic no worries you do not annoy me at all. I am rather happy to answer your questions ;)

Why are parser generators wrote in JavaScript? Isn't this a better task for a native app and done offline (saved and use the lexer later).

Each parser in each language will potential have their own generator in their respective language. So as this particular parser is a JS one, the generator is written in JS. Its that simple ;) Currently we have a declarative description of the RAML specification that we use to generate the structure and some validation of this structure to a specific programming language. With that we can make sure that all of the provided parser have the same interface. Any semantical validation and more is written natively of course. Although in the ned everything is native.

Why is there a so strong trend about making everything in JavaScript?

Not everything is done in JavaScript tbh. There is still a community around other languages such as Ruby, Go, .Net, Java, Scala, etc. Everything else is mostly a philosophical discussion and very opinionated ;)

sichvoge commented 8 years ago

@All, we plan to open source the current code base for the JS parser to continue implementing RAML 1.0 by early to mid April. Stay tuned!

hulkish commented 8 years ago

I thought RAML was already open source? What's the purpose of keeping it behind closed doors? Doesn't that only hurt the cause?

sichvoge commented 8 years ago

Hi, there is an experimental branch code that contains everything. After all tests pass we will merge that into the master.

BTW, RAML is not final yet. There are still some changes made for RC2.

hulkish commented 8 years ago

@sichvoge thanks!

sichvoge commented 8 years ago

Hi, we were able to pass all tests and the travis build and merged the code branch version into the master branch. Therefore, the source code is finally available for every one to discover and I really hope that will help not only you but also us to improve the overall quality.

nicbet commented 8 years ago

@sichvoge this is great news! Thanks to the team for making this happen!

sichvoge commented 8 years ago

Added some more release notes for this version https://github.com/raml-org/raml-js-parser-2/releases/tag/v0.2.0

petrochenko-pavel-a commented 8 years ago

Unbundled sources are published some time ago. So closing issue.

Regards, Pavel