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

CJS - End of life #1291

Closed
mikearnaldi opened this issue Sep 5, 2022 · 6 comments
Closed

CJS - End of life #1291

mikearnaldi opened this issue Sep 5, 2022 · 6 comments

Comments

@mikearnaldi
Copy link
Member

mikearnaldi commented Sep 5, 2022

At some point we will need to take the steps to drop cjs support, at the moment the build pipeline is verbose and in fact it opens for potential errors, we don't really support a mixed env we only support using either one of the targets but if any app for whatever reason uses both it will lead to errors because state will be duplicated.

With fast transpilers such as esbuild and node natively supporting esm it becomes less and less relevant to support cjs, in fact I am already defaulting to esm modules in pretty much everything I do.

While I understand that the ecosystem is not ready some push towards a unifying future is needed.

This issue is to vote on an end of life date from which we will no longer provide cjs builds.

Following the options:

  • 31/12/2022
  • 30/06/2023
  • 31/12/2023

While you may be tempted to just vote for the last option please take a moment to think about it and vote what you think it's best for the broader ecosystem.

To vote add a 'like' to one of the options below

@IMax153
Copy link
Member

IMax153 commented Sep 5, 2022

31/12/2022

@mikearnaldi
Copy link
Member Author

30/06/2023

@mikearnaldi
Copy link
Member Author

31/12/2023

@jasonkuhrt
Copy link

jasonkuhrt commented Nov 1, 2022

OTEL auto instrumentation doesn't support ESM yet, should that be waited for?

open-telemetry/opentelemetry-js#1946

open-telemetry/opentelemetry-js#1946 (comment)

Note that, manual instrumentation works fine.

@mikearnaldi
Copy link
Member Author

OTEL auto instrumentation doesn't support ESM yet, should that be waited for?

open-telemetry/opentelemetry-js#1946

open-telemetry/opentelemetry-js#1946 (comment)

Note that, manual instrumentation works fine.

When chatting with @gcanti more recently we though it may be a good idea to also poll some companies that are currently using either fp-ts or effect and get the feel, we don't really want to do a launch without a parachute so by all means this issue isn't settled just yet.

Specifically in regards of open-telemetry I doubt anyone would want to use auto instrumentation when using effect primarily because spans are tracked by effect itself so to get the parent-child relation right you need to instrument the wrappers around foreign calls (also otel-like tracing is becoming native in effect so that libraries can provide tracing facilities without depending on opentelemetry directly)

@dyladan
Copy link

dyladan commented Nov 2, 2022

Seems like you have a pretty reasonable understanding already but as the OTel JS maintainer I'm happy to answer questions regarding that. The comment linked by Jason sums it up well, particularly the point that the maintainers would welcome support but it is tricky and there are other priorities and limited resources. I would point out that there is a fairly up-to-date PR using import-in-the-middle open-telemetry/opentelemetry-js#2846. There are limitations (currently only one loader hook per process is possible) but it is better than nothing as they say.

I am also very interested in the idea of using diagnostic channels to fill this gap, but it will be a long time before we can rely on that as a widely adopted and used feature.

@DadeSko DadeSko moved this to Created in Issues Management Jan 30, 2024
@github-project-automation github-project-automation bot moved this from Created to Done in Issues Management Mar 19, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

5 participants