You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Several valuable ES6 features appear to be stable (arrow functions, classes (modulo private members), block scoping) and this month's (May 2013) tc39 meeting seems to be the deadline for a wiki-complete module system spec. Transpilers and engines are already prototyping support, and it is important that tern is not left behind.
If I recall correctly, the esprima and spidermonkey folks have started to agree on the syntax/AST extensions, but tern also needs to take the scoping, typing, and semantics into account (eg desugaring class syntax to ES5 features while keeping ES6 locations).
Yes, this is a project that's on the horizon. It might be huge, and will be tricky as long as the features are non-final and poorly documented. I'm not going to work on it yet, but if you want to, the first thing would be to add an ES6 mode to Acorn that parses at least the stable parts of the new syntax.
@RReverser note that this is the Tern repository, and your PR adds ES6 support to Acorn. There's going to be a bunch of additional work to be done to teach Tern to understand the new constructs.
Great news and a great job! How can we get it to work? I am using Sublime 3 with TernJS plugin which for now somehow marginally works with ES6 while the tern_for_sublime crashes. Thanks!
@tomitrescak Tern does not work with ES6 yet, only Acorn (the parser) does.
How does tern_for_sublime crash (i.e. what code, what error message)? It shouldn't -- theoretically it should just ignore the things it can't understand.
But I think Acorn should be customized to support ES6 inside tern.
I don't really understand why it should be customized to support ES6 differently inside Tern? How is that different from already implemented ES6 support?
Yes, we are currently not enabling ES6 parsing when calling acorn.parse because Tern does not understand the ES6 node types. The way to start supporting this would be to extend the AST walkers in infer.js so that they properly handle the new syntactic constructs.
I will to work on this eventually, but I'll need time and funding. The second can probably be addressed with another crowd-funder, which I intend to start at some point when I am less busy.
@marijnh I was also just thinking about getting to work on this as soon as finish better loose support in JSX, as I've got some free time, but same problem with 2nd part of your statement :)
Thank you for your hard work and for making tern “open source”.
But I just can’t hold back my opinion that people should be weary of non-copyleft licenses and CLAs, because they allow such “un-sportsmanlike” behavior.
Sorry, I obviously failed at expressing myself. I would certainly not prefer a closed source approach. I have been travelling the whole day and I am deas tired. Will reply properly soon, sorry & g'nite :)
We've reached $ 1,772 at bountysource and I've recently received another Tern-related contribution outside of that platform that I'm going to count too, putting us over the goal. I've just merged my es6 branch into master, and the ES6 work is now under the MIT license.
@gilligan Could you elaborate on your concerns about lack of transparency? I stated exactly what I did, and what happens when my financial goal is reached. You state that you'd prefer for this to be a closed-source commercial project. How would not being able to read, modify, or fork the source benefit you?
—
Reply to this email directly or view it on GitHub.
I think Marin should be a slave to all of us and have no rights, only
obligations to JavaScript programmers who don't have the time or skill to
do what he can.
Seriously, thanks Marin. I think getting the community to sponsor the work
is an incredibly reasonable approach. The money hopefully enables you to
have some time to really work on this project and then it's shared with the
community in true open source fashion. Honestly, I almost like the hostage
approach more - less risk as a donater.
Sorry, I obviously failed at expressing myself. I would certainly not
prefer a closed source approach. I have been travelling the whole day and I
am deas tired. Will reply properly soon, sorry & g'nite :)
We've reached $ 1,772 at bountysource and I've recently received another
Tern-related contribution outside of that platform that I'm going to count
too, putting us over the goal. I've just merged my es6 branch into master,
and the ES6 work is now under the MIT license.
@gilligan Could you elaborate on your concerns about lack of
transparency? I stated exactly what I did, and what happens when my
financial goal is reached. You state that you'd prefer for this to be a
closed-source commercial project. How would not being able to read, modify,
or fork the source benefit you?
—
Reply to this email directly or view it on GitHub.
—
Reply to this email directly or view it on GitHub #116 (comment).
Since the trolling is now commencing I will move this elsewhere. You should think about how you communicate. About exaggerations and accusations that abort discussions instead of resolving them by actually having them.
I think Marin should be a slave to all of us and have no rights, only
obligations to JavaScript programmers who don't have the time or skill to
do what he can.
Seriously, thanks Marin. I think getting the community to sponsor the work
is an incredibly reasonable approach. The money hopefully enables you to
have some time to really work on this project and then it's shared with the
community in true open source fashion. Honestly, I almost like the hostage
approach more - less risk as a donater.
Sorry, I obviously failed at expressing myself. I would certainly not
prefer a closed source approach. I have been travelling the whole day and I
am deas tired. Will reply properly soon, sorry & g'nite :)
We've reached $ 1,772 at bountysource and I've recently received another
Tern-related contribution outside of that platform that I'm going to count
too, putting us over the goal. I've just merged my es6 branch into master,
and the ES6 work is now under the MIT license.
@gilligan Could you elaborate on your concerns about lack of
transparency? I stated exactly what I did, and what happens when my
financial goal is reached. You state that you'd prefer for this to be a
closed-source commercial project. How would not being able to read, modify,
or fork the source benefit you?
—
Reply to this email directly or view it on GitHub.
—
Reply to this email directly or view it on GitHub #116 (comment).
—
Reply to this email directly or view it on GitHub.
@gilligan I was trying to have a discussion, by asking you to clarify your issue. I see no exaggeration or accusation in any of my messages here. I am, in fact, rather pissed off about your tone earlier in the thread, but I am trying to figure out what you mean before jumping to any conclusions.
Oh i did not mean you at all. And if I have offended you in any way I am sorry since this was not my intention.
What I was referring to were messages by people that jumped in drawing black/white pictures while apparently not understanding what I was on about.
"OMG This looks to me like someone said something about F/OSS that I don't like. Lets jump in !"
I have used open source software all my life, make anything l do open and try to open source things at work.
What I was trying to say was...
i thought it as unfortunate that there is some donation button with no clear goal/timeline/topic. You clarified it in comments later on
i found it odd that you would ask for donations on something that already exists in a private repo. I practically bought my es6 tern copy.
That being said I did donate and started talking to my employer about supporting the project. It boils down to me (and some colleagues) finding the process a bit odd.
I pointed out that it is your project and you can do with it as you wish. Yet I think it is only fair that I'd be allowed to share some concerns.
Lets not draw conclusions too quickly and cool down.
@gilligan I was trying to have a discussion, by asking you to clarify your issue. I see no exaggeration or accusation in any of my messages here. I am, in fact, rather pissed off about your tone earlier in the thread, but I am trying to figure out what you mean before jumping to any conclusions.
—
Reply to this email directly or view it on GitHub.
i found it odd that you would ask for donations on something that already exists in a private repo. I practically bought my es6 tern copy.
The strategy of asking people to pay for something they can get for free isn't usually terribly effective (though I'm definitely working on that front too, see my funding page, also linked from the project page). I've found that having some kind of 'carrot' that makes donating attractive can make a huge difference. I do not see how implementing first, then asking for money, is problematic. At least that way you're able to play with the implementation and verify that it works before deciding on whether to shell out for it.
The difference is exactly the difference between donating and purchasing.
By "donating" 30 USD I purchased a license (by shape of your expressed allowance) to use the es6 featured branch in your private repo.
I did do this because I am really fond of tern - it is a productivity boost to me - but I find this quite odd.
That is the reason why I suggest that you might want to think about a different model if money is a key factor. I have no problem in actually purchasing it. You could still have it on github and/or make it free for non commercial use.
So nobody pushed the donate button? Yes, that is what the open source community is like a lot. But your carrot is not just a carrot it hints at the fact that maybe you want/need a different model.
So that is what I referred to with the cake analogy. A github repo won't make an income.
i found it odd that you would ask for donations on something that already exists in a private repo. I practically bought my es6 tern copy.
The strategy of asking people to pay for something they can get for free isn't usually terribly effective (though I'm definitely working on that front too, see my funding page, also linked from the project page). I've found that having some kind of 'carrot' that makes donating attractive can make a huge difference. I do not see how implementing first, then asking for money, is problematic. At least that way you're able to play with the implementation and verify that it works before deciding on whether to shell out for it.
—
Reply to this email directly or view it on GitHub.
I pointed out that it is your project and you can do with it as you wish.
I don’ think that statement is true. According to github its the shared work of 59 different contributors (although clearly @marijnh has done most of it)
But the statement is also true because of the license. The MIT License basically gives anyone the ability to do whatever they wish with the software, including making a closed source fork and sell it for money.
Doing so is just fine by the license, but it sure offends some of the other 58 contributors. It sure would have pissed me off a lot. But alas, I am not one of the contributors.
I actually did check out the code some time ago and started implementing a feature without much success and never got around to actually finish it and make it work. But now at least I know not to contribute anything in the future. (Unless I sub-license my fork as GPL, which the MIT license allows me to do)
I admire your goal to actually make a living writing open source software and I wish you all the best for it. As in, doing the things you love as opposed to doing the things someone else tells you to. But the point of open source is that it invites others to contribute as well. And holding [their] code hostage as you said is simply not a good way to invite further contributions.
Again, I’m very sorry if this might have started a flame war. I will just shut up from now on :-)
I did not hold anyone's code hostage but my own. The master branch was entirely unaffected by the crowd-funding, and the only new work on the (briefly) non-free branch was my own work.
I'm going to lock this topic since I really don't have the emotional energy to deal with this kind of bullshit.
Activity
marijnh commentedon May 6, 2013
Yes, this is a project that's on the horizon. It might be huge, and will be tricky as long as the features are non-final and poorly documented. I'm not going to work on it yet, but if you want to, the first thing would be to add an ES6 mode to Acorn that parses at least the stable parts of the new syntax.
RReverser commentedon Jul 26, 2014
Which is to be closed by acornjs/acorn#110.
marijnh commentedon Jul 28, 2014
@RReverser note that this is the Tern repository, and your PR adds ES6 support to Acorn. There's going to be a bunch of additional work to be done to teach Tern to understand the new constructs.
RReverser commentedon Jul 28, 2014
Sure, my reply was rather for
bvalosek commentedon Dec 5, 2014
What would be the next steps for getting ES6 support in Tern now that acorn is parsing the es6 features?
I'd like to contribute in some way if possible, or even put a bounty for this feature.
RReverser commentedon Dec 5, 2014
There is still need to fix template literals in loose parser which is somewhat more tricky, but in general parser-side is ready.
tomitrescak commentedon Dec 10, 2014
Great news and a great job! How can we get it to work? I am using Sublime 3 with TernJS plugin which for now somehow marginally works with ES6 while the tern_for_sublime crashes. Thanks!
marijnh commentedon Dec 10, 2014
@tomitrescak Tern does not work with ES6 yet, only Acorn (the parser) does.
How does tern_for_sublime crash (i.e. what code, what error message)? It shouldn't -- theoretically it should just ignore the things it can't understand.
mk0x9 commentedon Jan 30, 2015
Is there any roadmap to support ES6 features?
I'm especially interested in classes and module imports.
angelozerr commentedon Jan 30, 2015
Tern starts supporting ES6 with ecma6.json https://github.com/marijnh/tern/blob/master/defs/ecma6.json
@marijnh has managed Promise, but ecma6.json must be improved again like Iterator support.
But I think Acorn should be customized to support ES6 inside tern.
RReverser commentedon Jan 30, 2015
@angelozerr
I don't really understand why it should be customized to support ES6 differently inside Tern? How is that different from already implemented ES6 support?
angelozerr commentedon Jan 30, 2015
@RReverser I don't know acorn, but with acorn you can set ecmaVersion http://marijnhaverbeke.nl/acorn/#section-4 although inside tern it is never done.
I suppose setting ecmaVersion gives features according the version (perhaps acorn is able to support iterator protocal?
But perhaps I'm wrong?
marijnh commentedon Jan 30, 2015
Yes, we are currently not enabling ES6 parsing when calling
acorn.parsebecause Tern does not understand the ES6 node types. The way to start supporting this would be to extend the AST walkers in infer.js so that they properly handle the new syntactic constructs.I will to work on this eventually, but I'll need time and funding. The second can probably be addressed with another crowd-funder, which I intend to start at some point when I am less busy.
RReverser commentedon Jan 30, 2015
@marijnh I was also just thinking about getting to work on this as soon as finish better loose support in JSX, as I've got some free time, but same problem with 2nd part of your statement :)
Oceanswave commentedon Feb 7, 2015
18 remaining items
Swatinem commentedon Aug 30, 2015
Thank you for your hard work and for making tern “open source”.
But I just can’t hold back my opinion that people should be weary of non-copyleft licenses and CLAs, because they allow such “un-sportsmanlike” behavior.
marijnh commentedon Aug 30, 2015
@Swatinem Do elaborate what exactly you are perceiving as un-sportmanlike behavior. (And how a copyleft license would have helped.)
JustinTulloss commentedon Aug 30, 2015
@marijnh It may be in everybody's best interest to lock this thread as it's now a discussion of licenses instead of ES6 support in tern.
gilligan commentedon Aug 30, 2015
Sorry, I obviously failed at expressing myself. I would certainly not prefer a closed source approach. I have been travelling the whole day and I am deas tired. Will reply properly soon, sorry & g'nite :)
Sent from my iPhone
bennidhamma commentedon Aug 31, 2015
I think Marin should be a slave to all of us and have no rights, only
obligations to JavaScript programmers who don't have the time or skill to
do what he can.
Seriously, thanks Marin. I think getting the community to sponsor the work
is an incredibly reasonable approach. The money hopefully enables you to
have some time to really work on this project and then it's shared with the
community in true open source fashion. Honestly, I almost like the hostage
approach more - less risk as a donater.
On Sun, Aug 30, 2015, 3:19 PM Tobias Pflug notifications@github.com wrote:
gilligan commentedon Aug 31, 2015
Since the trolling is now commencing I will move this elsewhere. You should think about how you communicate. About exaggerations and accusations that abort discussions instead of resolving them by actually having them.
marijnh commentedon Aug 31, 2015
@gilligan I was trying to have a discussion, by asking you to clarify your issue. I see no exaggeration or accusation in any of my messages here. I am, in fact, rather pissed off about your tone earlier in the thread, but I am trying to figure out what you mean before jumping to any conclusions.
gilligan commentedon Aug 31, 2015
Oh i did not mean you at all. And if I have offended you in any way I am sorry since this was not my intention.
What I was referring to were messages by people that jumped in drawing black/white pictures while apparently not understanding what I was on about.
"OMG This looks to me like someone said something about F/OSS that I don't like. Lets jump in !"
I have used open source software all my life, make anything l do open and try to open source things at work.
What I was trying to say was...
i thought it as unfortunate that there is some donation button with no clear goal/timeline/topic. You clarified it in comments later on
i found it odd that you would ask for donations on something that already exists in a private repo. I practically bought my es6 tern copy.
That being said I did donate and started talking to my employer about supporting the project. It boils down to me (and some colleagues) finding the process a bit odd.
I pointed out that it is your project and you can do with it as you wish. Yet I think it is only fair that I'd be allowed to share some concerns.
Lets not draw conclusions too quickly and cool down.
marijnh commentedon Aug 31, 2015
The strategy of asking people to pay for something they can get for free isn't usually terribly effective (though I'm definitely working on that front too, see my funding page, also linked from the project page). I've found that having some kind of 'carrot' that makes donating attractive can make a huge difference. I do not see how implementing first, then asking for money, is problematic. At least that way you're able to play with the implementation and verify that it works before deciding on whether to shell out for it.
gilligan commentedon Aug 31, 2015
The difference is exactly the difference between donating and purchasing.
By "donating" 30 USD I purchased a license (by shape of your expressed allowance) to use the es6 featured branch in your private repo.
I did do this because I am really fond of tern - it is a productivity boost to me - but I find this quite odd.
That is the reason why I suggest that you might want to think about a different model if money is a key factor. I have no problem in actually purchasing it. You could still have it on github and/or make it free for non commercial use.
So nobody pushed the donate button? Yes, that is what the open source community is like a lot. But your carrot is not just a carrot it hints at the fact that maybe you want/need a different model.
So that is what I referred to with the cake analogy. A github repo won't make an income.
marijnh commentedon Aug 31, 2015
No, I definitely don't. See also this blog post
Swatinem commentedon Aug 31, 2015
I really don’t want to make this into a flame war of any kind.
Also note that I’m not a lawyer so I probably have no idea what I’m talking about.
To reply to @gilligan
I don’ think that statement is true. According to github its the shared work of 59 different contributors (although clearly @marijnh has done most of it)
But the statement is also true because of the license. The MIT License basically gives anyone the ability to do whatever they wish with the software, including making a closed source fork and sell it for money.
Doing so is just fine by the license, but it sure offends some of the other 58 contributors. It sure would have pissed me off a lot. But alas, I am not one of the contributors.
I actually did check out the code some time ago and started implementing a feature without much success and never got around to actually finish it and make it work. But now at least I know not to contribute anything in the future. (Unless I sub-license my fork as GPL, which the MIT license allows me to do)
I admire your goal to actually make a living writing open source software and I wish you all the best for it. As in, doing the things you love as opposed to doing the things someone else tells you to. But the point of open source is that it invites others to contribute as well. And
holding [their] code hostageas you said is simply not a good way to invite further contributions.Again, I’m very sorry if this might have started a flame war. I will just shut up from now on :-)
marijnh commentedon Aug 31, 2015
I did not hold anyone's code hostage but my own. The master branch was entirely unaffected by the crowd-funding, and the only new work on the (briefly) non-free branch was my own work.
I'm going to lock this topic since I really don't have the emotional energy to deal with this kind of bullshit.
ref ternjs/tern#116 say thanks to Marijn,