Skip to content
This repository has been archived by the owner on Feb 19, 2018. It is now read-only.

CS2 Discussion: Project: Progress as of September 2017: Release candidate! 2.0.0-beta5 #88

Closed
GeoffreyBooth opened this issue Sep 2, 2017 · 17 comments
Labels

Comments

@GeoffreyBooth
Copy link
Collaborator

GeoffreyBooth commented Sep 2, 2017

Hey everyone,

CoffeeScript 2.0.0-beta5 is released, and it is the first (and hopefully only) release candidate for 2.0.0! Install it via: npm install coffeescript@next

It is an entirely bugfix release, and it could’ve been released as 2.0.0 but I thought it would be best to release it instead as our hopefully last beta because of the sheer number of pull requests that have gone into it. You can see the full changelog and list of PRs here, but the short version is that about two dozen pull requests have been merged in since 2.0.0-beta4, fixing all the bugs reported since that release as well as many older ones, some of which were years old. All of the bugs tagged priority have now been fixed, and of the open issues on the coffeescript repo, only 13 are bugs. I’d love to get that number down to zero, if anyone would like to help!

None of these remaining bugs are showstoppers that will hold up a 2.0.0 release, however, so if 2.0.0-beta5 is stable and no one reports any significant bugs in it, I want to release it as 2.0.0 as soon as possible. So to that end, I would like to ask everyone involved in this repo@rattrayalex, @JimPanic, @kirly-af, @ryansolid, @CliffS, @mikeyhew, @shreeve, @bd82, @edemaine, @greghuc, @svicalifornia, @YamiOdymel, @mrmowgli, @celicoo, @connec, @mitar, @kingdaro, @za-creature, @snowyu, @Alhadis, @vpj, @Inve1951, @Asc2011, @carlmathisen, @markwatne, @dadleyy, @objectkit, @aurium, @carlsmith, @DomVinyard, @nickdima, @tdsfugal, @danielbayley, @alangpierce, @triskweline, @ozjd, @zeekay, @zdenko, @lydell, @jashkenas—now is the time: please try your projects with 2.0.0-beta5! Please test it out in the next week, so that we can hopefully launch 2.0.0 in mid-September. Here’s how to test with it, no matter what build chain (Webpack, Gulp, Grunt, Browserify/Coffeeify, Meteor, whatever) you’re using:

  1. Clone the CoffeeScript 2 branch to your machine: git clone -b 2 https://github.com/jashkenas/coffeescript.git
  2. Duplicate your current project, including its node_modules and other untracked folders, into a new temporary folder.
  3. Search through all your folders to find the coffeescript or coffee-script folder. It’s most likely inside a node_modules folder. If you’re using an older version of NPM, you may have many such folders; do the following for each one you find.
  4. Inside that coffeescript/coffee-script folder, you’ll see a lib folder, and then another folder named coffeescript or coffee-script, e.g. coffeescript/lib/coffeescript. Delete all the files in this folder, leaving the folder empty.
  5. From the cloned repo in step 1, copy the files from that repo’s lib/coffeescript folder into the lib/coffeescript/lib/coffee-script folder you just emptied.
  6. Make sure the Node on your machine is Node 8+, and then build your project as you normally would. The CoffeeScript compiler might throw new errors related to breaking changes, especially if you’re a heavy user of classes. See the breaking changes notes and fix accordingly.
  7. Once it builds successfully, run your project in Node 8+ or an evergreen browser such as Chrome latest. Hopefully everything should work as expected. If you want to check your project in older runtimes, transpile your output code via Babel and then try in your older browser or Node version.

Please report your findings on this thread, and please report bugs by opening an issue after checking the breaking changes. If we see enough positive reports below, especially from significant, real-world projects, that will inspire confidence that this is ready to release.

Honor roll for 2.0.0-beta5: @helixbass, @zdenko, @connec, @bendrexl and @GeoffreyBooth. Thanks!

@Inve1951
Copy link

Inve1951 commented Sep 3, 2017

looks good on my end

@renchap
Copy link

renchap commented Sep 3, 2017

👍, works fine on my project (upgraded from beta4).

It would be awesome to have CS2 support (JSX being the biggest change) in coffeelint (clutchski/coffeelint#596) and syntax packages (in my case, Atom: atom/language-coffee-script#135) before the release, so people can upgrade and keep their tools. Unfortunately I have not been able to implement either, but if people here want to have a look :)

@Asc2011
Copy link

Asc2011 commented Sep 3, 2017

beta-4 broke sweet nuthing on my side - shall i upgrade now ?-)
thx for all this great piece of work :-)

@GeoffreyBooth
Copy link
Collaborator Author

@renchap Yes, the state of tooling around CoffeeScript can certainly be improved, and it’s an oft-cited complaint in #32. A few more “ecosystem” projects that could use updating are https://github.com/aponxi/sublime-better-coffeescript (in Python, for anyone proficient in that) and https://github.com/js2coffee/js2coffee. Anyone who wants to contribute, but is daunted by the CoffeeScript codebase, please consider these projects!

@renchap
Copy link

renchap commented Sep 4, 2017

I would also love to have CoffeeScript support in Prettier (https://github.com/prettier/prettier), but I think this is a much bigger work :)

@Asc2011
Copy link

Asc2011 commented Sep 4, 2017

@GeoffreyBooth (1) what about the online code-arenas, thinking of JS-BIN, Plunker, Code-PEN, SO and friends ? Will there be a CS2 browser-compiler publicly avail on CDN, that one can use on such sites ? E.g. i tried a thing where i have a handfull of promises and want to use all results as soon as the first promise resolves (minimal latency). A combination of a Promise.race, plus a generator and a async-fn in CS-beta4 - without any re-babeling - allows me do this. CS2-beta-5 can even subclass the magical JS-Array - with all Chrome-flags on, but hey, it works as expected and specified. But i can't yet publish this approach 'live', at least not on named arenas.
(2) Regarding the often requested in-browser-CS for immediate interaction alike that once was on coffeescript.org -> i clobbered myself a chrome-dev-tools-addon that is based/derived from CoffeeConsole2 with respect to recent browser-API changes/restrictions. I'll try to fork and publish that soon. But a subpage/playground on coffeescript.org would be nice, too. I like the new page-design, but for quick-experimentations, it loads too much and too long and thick.
@renchap prettier is close, i assume two ACE-panels or CM - but having CS-left and JS-right is pretty enough for my taste. The 'pretty-or-not'-debate is usually solved by agreeing on a coding-style-convention (a set of syntax-rules), which then gets enforced by the great CoffeeLint. Both ACE and CM support that. So you can spare the second panel or use that for the compiled JS-code ;-).
(3) regarding sublime-text-support - i use it, its great sometimes and i hate it sometimes, but it does compile, builds and lints(needs little update), and some fiddling to get it working. To be honest - some things with ST3 needs some fiddling :-) and i think points (1&2) are much more important here, because instant/interactive and 24/7 is king these days.
(3a) webpack has all i needed, SystemJS, too. But those are not for rookies. I enjoyed writing a webpack-config in CS and BTW halleluja. Setups have grown complicated and CS fits well in IMHO.
(4) why not doing it like in the old days, some viral announcement says "CS-2 will support let/const/types/tuples/contracts and maybe ES8-async-generators in march, expect a release by the end of the first quarter-18" :) maybe it comes on april first then...
wine finished now, need sleep.. forget about (4), thats too crazy...

@snowyu
Copy link

snowyu commented Sep 5, 2017

Doesn't the cs2 support RTL(Run Time Library) yet? It seems only to support the ES2015 now.
Saddly. It's so easy to switch the generated codes through RTL. and more easy to modify and improve it(RTL). for ex, we can easily switch the es2015 implementation, just specify the different RTL.

@GeoffreyBooth
Copy link
Collaborator Author

What does “support RTL” mean?

@GeoffreyBooth
Copy link
Collaborator Author

GeoffreyBooth commented Sep 5, 2017

what about the online code-arenas, thinking of JS-BIN, Plunker, Code-PEN, SO and friends ?

It’ll be on them to upgrade the version of the CoffeeScript compiler they’re using, and update their build process so that the CoffeeScript compiler’s output is piped through Babel. They all also already support Babel as a transpilation option, so it shouldn’t be too difficult. But someone (you!) will need to poke them to get that process started, probably after 2.0.0 is out.

Will there be a CS2 browser-compiler publicly avail on CDN, that one can use on such sites ?

The browser compiler is available at http://coffeescript.org/v2/browser-compiler/coffeescript.js and jsdelivr.com now automatically hosts every NPM package, so you could also load via that. This compiler has the same limitation though; you then need to pipe its output through Babel. Presumably Babel also has a browser compiler, that powers their browser REPL. (Or if you know your code will only be run on Chrome latest, and you refrain from JSX and modules, you can do without Babel.)

Regarding Sublime, the package I linked to is just for syntax highlighting and code completion, not automatic compilation (or if it does that too, I don’t use that part of it). I’d really like to at least get the syntax highlighting updated, it still doesn’t even recognize import/export.

webpack has all i needed, SystemJS, too. But those are not for rookies.

See jashkenas/coffeescript#4615. I would love to have a Webpack demo app to link to from the docs, to give people an example to follow for how to use CoffeeScript 2 with Webpack. If you would be so kind as to fork your project into a minimal demo and post it as its own repo, I’d love to link to it.

why not doing it like in the old days, some viral announcement says “CS-2 will support let/const/types/tuples/contracts and maybe ES8-async-generators in march, expect a release by the end of the first quarter-18"

I’m not sure what you mean. CoffeeScript 2 has all the features we intended to support. Look at the README for this repo. Some features were decided via committee that we wouldn’t include, and many of those got explained in http://coffeescript.org/v2/#unsupported. Once 2.0.0 is out, the only roadmap is:

  • bugfixes for existing features
  • odds and ends that didn’t get finished in time for 2.0.0, like new.target and computed property keys; see issues tagged enhancement or change.
  • refactoring object destructuring to use the object destructuring syntax, once that syntax reaches Stage 4
  • refactoring bound class methods to use final syntax, if that ever gets officially supported in ES; and ditto for any of our other inventions they may decide to adopt
  • potentially refactoring the compiler itself to not use Jison, or output a Babel AST for closer integration with the Babel ecosystem

There’s no “even greater” release around some distant corner that people should look forward to. CoffeeScript 2 is it. There may someday be a version 3 that throws backward compatibility under the bus and makes all variables block-scoped and so on and so forth, but I don’t see anyone currently involved in this project having the time or motivation to undertake such an ambitious effort anytime soon, nor the appetite in the broader community for a majorly-breaking-change release. If anyone has significant development resources to contribute, whether they be programmer hours or money to hire developers, IMHO those resources would be best spent on improving the ecosystem projects listed above.

@jashkenas
Copy link

Docco compiled with CS2 Beta 5 works great! As does a "Binary Ring" sketch I've got lying around. As does a Buddhabrot. Go go go!

image

@snowyu
Copy link

snowyu commented Sep 6, 2017

@GeoffreyBooth

What does “support RTL” mean?

First abstract the commonality of the language as the core, eg:

  • Space indents for block, the curly braces are optional.
  • The brackets are optional for function revocation.
  • The array, object(dict) assignment could be no comma, instead of using the block.
  • The functional expression definition could be '->' or '=>'.
  • etc...

And then the transfer code implementation as run-time library in different folders: javascript/es2015, typescript, java ...

Now we can generate typescript code like this:

coffee --rtl /write-your-rtl/typescript/ xxx.coffee

@GeoffreyBooth
Copy link
Collaborator Author

GeoffreyBooth commented Sep 7, 2017

Hey folks,

I just merged in jashkenas/coffeescript#4683 to the 2 branch, so if anyone wants to test the latest 2 with their projects, that would be great! Same instructions as above. Unless anyone reports anything else, I don’t think we’ll have a beta6 or any other PRs merged into 2 before the 2.0.0 release.

@GeoffreyBooth
Copy link
Collaborator Author

And FYI, the master branch has become 1, and the 2 branch is now master. So new pull requests can target master. We can also drop the “[CS2]“ prefix on issues and pull requests.

@GeoffreyBooth
Copy link
Collaborator Author

Okay folks, last call, for real: jashkenas/coffeescript#4701

The 2.0.0 PR (and current master) has a few bug fixes since 2.0.0-beta5. If anyone has time today to do one last test with their projects, I’d love to hear that all is still well:

npm uninstall coffeescript # or coffee-script
npm install --save-dev https://github.com/jashkenas/coffeescript.git

The above installs the latest master, which is the same compiler code as the 2.0.0 PR (the PR just updates the docs).

@renchap
Copy link

renchap commented Sep 17, 2017

👍 Good for me, tested on my app (with JSX).

@CliffS
Copy link

CliffS commented Sep 17, 2017 via email

@coffeescriptbot coffeescriptbot changed the title Progress as of September 2017: Release candidate! 2.0.0-beta5 CS2 Discussion: Project: Progress as of September 2017: Release candidate! 2.0.0-beta5 Feb 19, 2018
@coffeescriptbot
Copy link
Collaborator

Migrated to jashkenas/coffeescript#4981

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

No branches or pull requests

7 participants