Skip to content
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

Drakov doesn't install with Node 4.0.0 #89

Closed
yakovkhalinsky opened this issue Sep 9, 2015 · 16 comments
Closed

Drakov doesn't install with Node 4.0.0 #89

yakovkhalinsky opened this issue Sep 9, 2015 · 16 comments

Comments

@yakovkhalinsky
Copy link
Contributor

When installing Drakov, Drafter.js has a build error, caused by protagonist not building on Node 4.0.0.

@ChALkeR
Copy link

ChALkeR commented Sep 12, 2015

Adding to the list: nodejs/node#2798.
protagonist issue: apiaryio/protagonist#81

@yakovkhalinsky
Copy link
Contributor Author

Thanks @ChALkeR for the update 👍

@artlogic
Copy link
Contributor

Drafter.js appears to be deprecated, and doesn't look like it's going to be updated with the latest protagonist: https://github.com/apiaryio/drafter.js#deprecation-notice

Is there a possibility to update the drafter dependency to protagonist, as suggested?

@yakovkhalinsky
Copy link
Contributor Author

@artlogic the reasoning behind using Drafter.js is to give users of Drakov access to using attributes/MSON.

Unfortunately, this isn't supported in Protagonist yet.

We need to spend some time on implementing other libraries for parsing the API files in the near future.

For some background on the situation, have a read through #60

Let me know if you have any questions.

@artlogic
Copy link
Contributor

Thanks for the info - would it make sense to fork Drafter.js and modify it to work with the latest protagonist in the interim?

@yakovkhalinsky
Copy link
Contributor Author

That's a good question, not one I had considered.

If we were able to get more contributors for it, I might thing about it. As it stands we're pretty stretched for time to work on just Drakov :)

I'll have a dig through the Drafter.js source and have a think about it 👍

@artlogic
Copy link
Contributor

I spent a bit of time looking at this. One fairly easy change is forcing protagonist to output AST as opposed to Refract. The place where I'm running up against a problem is with the MSON data structures (of course). I'm attempting to parse https://github.com/apiaryio/drafter.js/blob/master/test/fixtures/dataStructures.apib and running into the following:

protagonist 0.20.1 output for Coupon:

{ element: 'dataStructure',
  name: { literal: 'Coupon', variable: false },
  typeDefinition: 
   { typeSpecification: 
      { name: { literal: 'Coupon Base', variable: false },
        nestedTypes: [] },
     attributes: [] },
  sections: 
   [ { class: 'memberType',
       content: 
        [ { content: 
             { name: { literal: 'id' },
               description: '',
               valueDefinition: 
                { values: [ { literal: '250FF', variable: false } ],
                  typeDefinition: 
                   { typeSpecification: { name: 'string', nestedTypes: [] },
                     attributes: [] } },
               sections: [] },
            class: 'property' } ] } ] }

protagonist 1.0.0 Output (1.1.0 is currently broken, to be fixed soon) for Coupon:

{ element: 'dataStructure', content: [ { element: 'Coupon' } ] }

As you can see, a lot of structure is suddenly missing which causes a crash pretty much right away. If you have any insight into this, I'd appreciate it. I'll keep digging as time allows.

@obihann
Copy link
Contributor

obihann commented Nov 20, 2015

Any change in this?

@yakovkhalinsky
Copy link
Contributor Author

@obihann not yet, we still need to look at the upstream dependencies to fix this.

We'll post an update in here if there is any change. I'm hoping to look at this in the next month, as I too would like to use node.js 4.2.2 👍

@artlogic
Copy link
Contributor

Based on my investigation about a month ago, I think MSON support may need to be dropped and then re-introduced as protagonist slowly gains support. I'd be willing to devote some time to helping with the transition to protagonist as I'd very much like to move to node 4.

@yakovkhalinsky
Copy link
Contributor Author

@artlogic appreciate the offer of assistance.

Might have to have a think about this and discuss with the others. We could propose upping the version to a new minor release (0.2.x) and break the support for MSON, allowing users who don't need it to run drakov on newer version of node.js, but keep it going in the current minor release (0.1.x).

I'll get in touch with the other maintainers and we try and make a call on this by perhaps mid next week (Wednesday) 👍

@yakovkhalinsky
Copy link
Contributor Author

I'm sympathetic as I am now working in a team using Node.js 4.2 and would really like to make use of drakov.

@artlogic
Copy link
Contributor

artlogic commented Dec 2, 2015

@yakovkhalinsky Looks like I'll have some time this month if you'd be willing to entertain a breaking 0.2.x version based on protagonist.

@yakovkhalinsky
Copy link
Contributor Author

@artlogic have discussed this with @marcelogo and I think we could accept dropping MSON support in a 0.2.x release, which means people who have their package.json setup to use 0.1.x would still be alright.

I think it is more important for all concerned to progress with the current Node.js versions.

@PavelPolyakov
Copy link

Hi guys,

Just got to know drakov today and met the issue.
Any updates when we expect it to be resolved?

Regards,

@yakovkhalinsky
Copy link
Contributor Author

Hi @PavelPolyakov hopefully in the coming weeks we can get this resolved.

Currently the max version of Node.js is 0.12.x

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants