-
Notifications
You must be signed in to change notification settings - Fork 108
Import problems with 0.14 #79
Comments
That import statement is wrong. It should be import * as opentracing from 'opentracing' |
ACK, that fixes it. But isn't it a serious incompatibility with 0.13? |
@yurishkuro will respond to #78 (comment) here. TypeScript does export the default when you have a default export: export default class IAmTheDefault {}
export class IAmNot {} can be imported correctly with import IAmTheDefault from '...'
// or
import { default as IAmTheDefault, IAmNot } from '...' to get an object of all exports, use cc @rochdev |
My concern is more about the actual services using the API. I don't mind fixing jaeger-client itself to use the recommended syntax, but fixing the real services is extremely difficult. But the services are all in Node 0.10, not using Babel. I'll continue experimenting. |
Is it really? It's just a global search & replace (and doesn't break anything until you update the package) |
According to semantic versioning, a minor version bump over |
@rochdev I briefly mentioned it in the changelog: https://github.com/opentracing/opentracing-javascript/blob/master/CHANGELOG.rst#0140
|
We should elaborate on that, give the workaround. |
Yeah, sorry, I thought LightStep was the only Tracer that depended on this. It wasn't used in any examples. I would add
|
far from being that simple. We have 100s of services in 100s of individual Git repos with all kinds of cross-dependencies. The upgrade will happen in a low-level infra library. Fortunately, most of them do not import opentracing directly, usually indirectly, to avoid dependency hell: var opentracing = require('jaeger-client').opentracing; But some do import it directly, like this: var opentracing = require('opentracing'); Is that going to break after TypeScript? I can't verify this at the moment. |
No, that will give the expected result. It's equivalent to |
If your services are all using ES5 then they should all continue working :) |
+1, verified. |
I was testing 0.14 with jaeger-client-node, and ran into the following issue. Our client is written in ES6 and transpiled to JS with babel.
https://github.com/uber/jaeger-client-node/blob/master/test/udp_sender.js
compiled to
When running throws this error:
@felixfbecker - any idea?
The text was updated successfully, but these errors were encountered: