Skip to content
This repository has been archived by the owner on Sep 20, 2021. It is now read-only.

Make changes needed to compile on CoffeeScript 2 #32

Closed
wants to merge 1 commit into from

Conversation

connec
Copy link
Owner

@connec connec commented Dec 22, 2016

This can't be merged until CoffeeScript 2 is released and connec/plantation has been upgraded to it.

There were 4 sources of breakages:

  • super must be called in extended classes with constructors.
  • Class prototype methods are non-enumerable, so util.extend had to be
    updated to use Object.getOwnPropertyNames and
    Object.getPrototypeOf.
  • Default arguments will only be used for undefined values, which
    broke a test setup in test/test.coffee.
  • Due to super needing to be called before @ parameters are
    availble, the stack set by YAMLError#constructor was calling
    #toString of subclasses whose @ parameters were not yet available.
    The chosen fix was to make #stack a getter.

There were 4 sources of breakages:

- `super` must be called in extended classes with constructors.
- Class prototype methods are non-enumerable, so `util.extend` had to be
  updated to use `Object.getOwnPropertyNames` and
  `Object.getPrototypeOf`.
- Default arguments will only be used for `undefined` values, which
  broke a test setup in `test/test.coffee`.
- Due to `super` needing to be called before `@` parameters are
  availble, the stack set by `YAMLError#constructor` was calling
  `#toString` of subclasses whose `@` parameters were not yet available.
  The chosen fix was to make `#stack` a getter.
@connec
Copy link
Owner Author

connec commented Jan 3, 2018

Implemented in 77896d3

@connec connec closed this Jan 3, 2018
@connec connec deleted the coffeescript2 branch January 3, 2018 11:44
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant