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

[WIP] Set up transition to TypeScript #98

Draft
wants to merge 22 commits into
base: master
Choose a base branch
from
Draft

[WIP] Set up transition to TypeScript #98

wants to merge 22 commits into from

Conversation

mizzao
Copy link
Member

@mizzao mizzao commented Nov 4, 2019

Building on decaffeination for TS conversion.

package.js Outdated
@@ -46,6 +46,8 @@ Package.onUse(function (api) {

// Non-core packages
api.use("aldeed:[email protected]");
// Should be replaced with straight up built-in 'typescript' in Meteor 1.8.2
api.use("adornis:[email protected]");
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that this is a temporary package someone built to maintain the abandoned barbatus:typescript, which is in turn deprecated by first-class TypeScript support in Meteor 1.8.2.

So it's not clear if we'd need this at all, depending on the Meteor version we're using.

@mizzao mizzao changed the title [WIP] Set up ability to transition to TypeScript [WIP] Set up transition to TypeScript Nov 5, 2019
@mizzao
Copy link
Member Author

mizzao commented Nov 7, 2019

@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: Adornis/typescript#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:

  • barbatus:typescript was the earliest contender but stopped getting maintained sometime in 2018
  • adornis:typescript was a fork of barbatus because someone needed to maintain it
  • Meteor 1.8.2 (currently in RC) has built in TS support, but as I mentioned before forcing TurkServer apps to run on 1.8.2 means we will need to go make a bunch of Mongo fixes and who knows what else.

@mizzao
Copy link
Member Author

mizzao commented Nov 7, 2019

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

@mizzao
Copy link
Member Author

mizzao commented Nov 7, 2019

@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
Copy link

mitar commented Nov 7, 2019

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.

@mizzao mizzao force-pushed the typescript branch 2 times, most recently from 8e288f4 to c7e4b4f Compare November 9, 2019 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants