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

Recent Changes 2018-12-xx #1647

Closed
kazk opened this issue Dec 4, 2018 · 8 comments
Closed

Recent Changes 2018-12-xx #1647

kazk opened this issue Dec 4, 2018 · 8 comments

Comments

@kazk
Copy link
Member

kazk commented Dec 4, 2018

I'm going to start announcing Codewars changes, using issues for now. I'll close this when I post a new one.

Feel free to post comments here if you have any questions about the changes.

Code Runner

New Languages

  • Add PureScript
  • Add Elm

Please try/translate them and let me know if you find issues.

New Language Versions

  • Add OCaml 4.07
  • Add Lua 5.3
  • Add Node.js 10.x (unreleased)
    I've decided to drop the custom test framework cw-2.js and use Mocha under the hood.
    Assertion methods with the same name are still provided to make the transition smooth. They're just wrappers around Chai.
    You can use Chai directly for better assertion methods and use fast-check for property based testing.
    Existing contents should be compatible as long as the tests are written using describe/it. There's no change to Node 6/8 so incompatible ones can continue to use older versions of Node for now.
    When this is released, I'll run a script and update compatible ones to use Node 10. Then create a list of incompatible ones similar to what we did when switching to the new runner.

Codewars

  • Lots of bug fixes, reducing technical debts, and minor performance improvements
  • Major framework/dependency upgrades
@Voileexperiments
Copy link

Voileexperiments commented Dec 7, 2018

Existing contents should be compatible as long as the tests are written using describe/it.

Is it possible to make mocha not polluting the global space with all its test methods? Dropping tons of functions into global scope is problematic because they can easily collide with user defined variables, as well as providing extra vectors of vulnerabilities (e.g it's still possible to call test assertion methods in user code). Basically, I think sticking to Test.xxx is much safer and saner.

It looks possible, but apparently it's only available when the JS file is run via mocha binary. Looking further into this kinda makes me want to drop mocha altogether and use something better-designed and which the devs are more open-minded to users and not just straight out declaring users "unhelpful" and their requests "stupid". Then it'd be much easier to maintain and get support in the future.

Or, at least, wrap mocha into a module that exports all its functions into a namespace, and then import that module?

@kazk
Copy link
Member Author

kazk commented Dec 7, 2018

We can consider other test frameworks later when Codewars can handle multiple test frameworks per language.

Reasons to use Mocha are:

  • Better than cw-2 for sure
  • Requires minimum changes to existing contents
  • Integration with third party assertion libraries
  • Already used on Qualified

If I'm understanding correctly, that "Using Mocha programmatically" wiki page is basically showing how to replace the mocha executable. Test files will look the same, using globals.

Or, at least, wrap mocha into a module that exports all its functions into a namespace, and then import that module?

I don't think it can be done easily. I'd assume someone would have done it already if it's possible.

@kazk kazk changed the title Recent Changes 2018-12-04 Recent Changes 2018-12-xx Dec 17, 2018
@kazk kazk pinned this issue Dec 19, 2018
@Blind4Basics
Copy link

Blind4Basics commented Dec 20, 2018

I just checked some basic stuff in the preview site, about comments markdown:

  • might be unrelated but in preview mode, the redaction panel is missing the first character of each line.
  • the code blocks bug displayed as normal text when the message is posted while it appears as code block in preview seems to be there yet. At least, using backticks, that works, this time.
  • the title markdown isn't "title" anymore in the posted message (smaller than regular text in bold!)
  • title level 2 is smaller than regular text in the posted message... :/
  • some line feed don't show up in the preview but appear in the posted message (see bold/italic/both part)

see below:

  • preview mode:
    image

  • posted:
    image

@kazk
Copy link
Member Author

kazk commented Dec 20, 2018

Thanks for testing @Blind4Basics.

  • might be unrelated but in preview mode, the redaction panel is missing the first character of each line.

This seems unrelated and happens when writing new comments and not editing existing :/

  • title level 2 is smaller than regular text in the posted message... :/

This looks like a CSS issue. Some rule with higher specificity is making it smaller. I haven't touched the frontend yet and not looking forward to.


The markdown preview and the actual doesn't always match because two different engines are used (#1640). But I think it should be closer compared to before because the server side engine also follows Common Mark now.

I'll see if I can make the preview match the actual by adding some options. The server side one is not as configurable.

@hobovsky
Copy link

Some katas (for example this one ) might have descriptions and/or discourse sections messed up because they use ~ character extensively. New markup engine introduces strikethrough markup, which was not present before, and ~ character got new meaning.

@FArekkusu
Copy link

FArekkusu commented Dec 23, 2018

Something is wrong with how comments are shown in different places. The upper part is how the comment looks on the dashboard, and the lower part is how it looks in the kata discourse.

image

I assume the user messed the comment markdown while writing his comment, but I'm sure I haven't seen anything like this before the update.

@kazk
Copy link
Member Author

kazk commented Dec 23, 2018

@FArekkusu is that from preview? I reverted the update because of some weird errors and haven't re-deployed yet. So if you saw that on production version then it wasn't introduced by the update.

The dashboard comments can be outdated because it's cached heavily. It looks like the edits were not reflected when you saw it.

Looks like the preview is showing comments from a day ago as newest for some reason. It was always less up to date compared to the production one but it looks like it's been stuck.

I might not work on this during holidays but I'll be back on Wednesday.

@FArekkusu
Copy link

@kazk no it was not from preview version. Must be a bug with the current comment system.

@kazk kazk closed this as completed Feb 13, 2019
@kazk kazk unpinned this issue Feb 13, 2019
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