TurkServer / turkserver-meteor

Web-based, real-time behavioral studies and experiments using Meteor
http://turkserver.readthedocs.io
MIT License
90 stars 23 forks source link

[WIP] Set up transition to TypeScript #98

Open mizzao opened 4 years ago

mizzao commented 4 years ago

Building on decaffeination for TS conversion.

mizzao commented 4 years ago

@ejolly here's what I'm stuck on, that perhaps you can help with:

  1. Check out this branch
  2. Run meteor --release 1.6.1.4 test-packages ./

I'm currently getting the issues reported here: https://github.com/Adornis/typescript/issues/20

This is a WIP branch so if TS is getting built correctly you will see other errors. But right now I can't even get the TS files to get processed at all, so maybe you can take a look and see if I'm doing something stupid.

N.B. the history of TS plugins in Meteor:

mizzao commented 4 years ago

Seems like having a package.json breaks .travis.yml testing. So we need to have those types hang out elsewhere.

mizzao commented 4 years ago

@mitar I haven't worked with Meteor for a while and trying to update this package to TypeScript seems like a huge pain. I think you might easily know the answer to this question:

  1. What is the right package to be using to build typescript? Is it barbatus:typescript, adornis:typescript, or typescript? What if I don't want to use Meteor 1.8.2 yet (because of changes in Mongo 4.0?)
  2. How do you resolve circular linking dependencies? For example, I'm currently seeing this error on this branch with meteor --release 1.6.1.4 test-packages ./. This module is imported fine by other files, so I'm not sure why it suddenly complains now.
W20191107-17:16:23.287(-5)? (STDERR) Error: Cannot find module '/mizzao_turkserver/server/assignment'
W20191107-17:16:23.287(-5)? (STDERR)     at makeMissingError (packages/modules-runtime.js:231:12)
W20191107-17:16:23.287(-5)? (STDERR)     at require (packages/modules-runtime.js:241:19)
W20191107-17:16:23.287(-5)? (STDERR)     at server_api.js (mizzao_turkserver/server/server_api.ts:4:1)
W20191107-17:16:23.287(-5)? (STDERR)     at fileEvaluate (packages/modules-runtime.js:343:9)
W20191107-17:16:23.288(-5)? (STDERR)     at require (packages/modules-runtime.js:238:16)
W20191107-17:16:23.288(-5)? (STDERR)     at mizzao_turkserver/admin/admin.ts:734:2
W20191107-17:16:23.288(-5)? (STDERR)     at mizzao_turkserver/admin/admin.ts:734:2
W20191107-17:16:23.288(-5)? (STDERR)     at /tmp/meteor-test-run14d9k5f.cmh4/.meteor/local/build/programs/server/boot.js:411:36
W20191107-17:16:23.288(-5)? (STDERR)     at Array.forEach (<anonymous>)
W20191107-17:16:23.289(-5)? (STDERR)     at /tmp/meteor-test-run14d9k5f.cmh4/.meteor/local/build/programs/server/boot.js:220:19
W20191107-17:16:23.289(-5)? (STDERR)     at /tmp/meteor-test-run14d9k5f.cmh4/.meteor/local/build/programs/server/boot.js:471:5
W20191107-17:16:23.289(-5)? (STDERR)     at Function.run (/tmp/meteor-test-run14d9k5f.cmh4/.meteor/local/build/programs/server/profile.js:510:12)
W20191107-17:16:23.290(-5)? (STDERR)     at /tmp/meteor-test-run14d9k5f.cmh4/.meteor/local/build/programs/server/boot.js:470:11
mitar commented 4 years ago

Sorry, I am not using TypeScript nor have I tried using it. But I read that with the upcoming 1.8.2 there should be better official support. But I do not know much about that.

Maybe join this Slack and ask for help there. I have seen people discussing it there.