weixin_39675038
weixin_39675038
2021-01-09 07:18

Consider dropping the hard gnode dependency

In response to #433 and #445, I think it's time to consider dropping gnode throughout the duo libs: - It's becoming more common for devs to use ES6 transpilers, and our hard coupling with gnode prevents others (like babel) from being used easily (#445) - Some bugs have been really tricky to pin down, (#433) but that problem would have been solved much faster if we just got a syntax error right away - Stack traces get really confusing when gnode is pulled in automatically - node 0.12 is now the official stable version, and iojs has generators enabled w/o the flag, so I don't think we need to put as much effort into supporting node 0.10 (we should still support it, but we use gnode only for our CI tests) - We already expose _duo as the raw node script, making it easy to support other transpilers (and even gnode if people so desire) to execute duo's CLI in a specific env

该提问来源于开源项目:duojs/duo

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

7条回答

  • weixin_39995764 weixin_39995764 4月前

    +1 i'm fine with this

    点赞 评论 复制链接分享
  • weixin_39675038 weixin_39675038 4月前

    I'm going to push forward on this soon, it seems like lots of weird edge-cases are cropping up because of gnode/regenerator. (and with people using node 0.12 more often, the errors mentioned here really obscure the fact that the --harmony-generators flag was left out)

    点赞 评论 复制链接分享
  • weixin_39995764 weixin_39995764 4月前

    sgtm!

    点赞 评论 复制链接分享
  • weixin_39710951 weixin_39710951 4月前

    +1 from me, but unfortunately, a lot of my team is still using node 0.10... and it's what we've got in production.

    i'll either get people to move to iojs/node 0.12, or try to hack something together on my end using gnode.

    点赞 评论 复制链接分享
  • weixin_39675038 weixin_39675038 4月前

    yeah, my team still has node 0.10 around as well. (though we're using 0.11 more often) Thankfully, all you need to do if you know you're using node 0.10 is to add gnode to your build command. (you guys use make right?)

    点赞 评论 复制链接分享
  • weixin_39710951 weixin_39710951 4月前

    yep, we'll just:

     Makefile
    build.js: ...
      $(BIN)/gnode $(BIN)/_duo ...
    
    点赞 评论 复制链接分享
  • weixin_39675038 weixin_39675038 4月前

    The last dependency including gnode is duo-test, but since that's a sub-command it doesn't affect duo core anymore.

    点赞 评论 复制链接分享

相关推荐