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

moving dev dependency for types to main dependency #468

Merged
merged 2 commits into from
May 8, 2021

Conversation

obecny
Copy link
Member

@obecny obecny commented May 4, 2021

moving dev dependency for types to main dependency

@obecny obecny added the bug Something isn't working label May 4, 2021
@obecny obecny self-assigned this May 4, 2021
@obecny obecny requested a review from a team May 4, 2021 16:56
@@ -54,7 +54,6 @@
"@types/jquery": "3.5.5",
"@types/mocha": "7.0.2",
"@types/node": "14.14.43",
"@types/shimmer": "1.0.1",
Copy link
Member

Choose a reason for hiding this comment

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

Is this intentional?

Copy link
Member Author

Choose a reason for hiding this comment

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

yes

@@ -60,6 +59,7 @@
"@opentelemetry/instrumentation": "^0.19.0",
"@opentelemetry/resources": "^0.19.0",
"@opentelemetry/semantic-conventions": "^0.19.0",
"@opentelemetry/tracing": "^0.19.0"
"@opentelemetry/tracing": "^0.19.0",
"@types/aws-lambda": "*"
Copy link
Member

Choose a reason for hiding this comment

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

If we don't have at least ^ we might get a version that is incompatible with us and users will fail to compile until we release an update. This is very dangerous

Copy link
Member Author

Choose a reason for hiding this comment

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

If we don't have at least ^ we might get a version that is incompatible with us and users will fail to compile until we release an update. This is very dangerous

* is what @Flarna requested looks like it is not working

Copy link
Member

Choose a reason for hiding this comment

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

I tried '*' locally in a hapi and aws-lambda instrumentation and it worked. But most likely I tried the wrong thing...
It's used on default in @types packages from DefinitelyTyped.

Which error happened?

Copy link
Member

Choose a reason for hiding this comment

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

I wouldn't expect an error but it looks like there was a force push so i can't see the old test run.

@Flarna it was mentioned you requested *. Do you think we shouldn't worry about the issue I mentioned above where a breaking change might break our users until we push a new release?

Copy link
Member

Choose a reason for hiding this comment

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

Ah ok, I misunderstood the message above.

If we use * it means we accept any version and if nothing is specified the latest available is used. On consume side it means it will be always deduped and they don't get two versions installed.

Clearly * has the potential to break our CI where the actual build step is running. But using ^ may also break our CI because @types packages don't follow semver therefore even a patch version may break something.

On user side the opentelemetry packages are not transpiled anymore therefore the version should not matter.

So far my understanding... but honestly speaking types I'm not sure if I get all corner cases.
@types packages can be beasts sometimes - as we have recently seen here with the hapi/hapi-podium types.

Copy link
Member

Choose a reason for hiding this comment

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

Just to be clear regarding my request: I'm fine with all variants to solve this as all of them may require to tune later.

Copy link
Member

Choose a reason for hiding this comment

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

maybe we should even do ~. We have seen with the metapackage that the typescript compiler is checking transitive type dependencies otherwise we wouldn't have this issue.

Honestly I think keeping pinned versions is the safest for the time being.

@codecov
Copy link

codecov bot commented May 4, 2021

Codecov Report

Merging #468 (3294280) into main (2cbf8e7) will increase coverage by 0.12%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main     #468      +/-   ##
==========================================
+ Coverage   95.20%   95.32%   +0.12%     
==========================================
  Files         131      127       -4     
  Lines        8279     8092     -187     
  Branches      790      776      -14     
==========================================
- Hits         7882     7714     -168     
+ Misses        397      378      -19     
Impacted Files Coverage Δ
...ages/opentelemetry-host-metrics/src/BaseMetrics.ts
...ges/opentelemetry-host-metrics/test/metric.test.ts
packages/opentelemetry-host-metrics/src/metric.ts
...ges/opentelemetry-host-metrics/src/stats/common.ts
packages/opentelemetry-host-metrics/src/enum.ts
...ackages/opentelemetry-host-metrics/src/stats/si.ts
packages/opentelemetry-host-metrics/src/version.ts
...metry-instrumentation-document-load/src/version.ts 100.00% <0.00%> (ø)
...entation-document-load/src/enums/AttributeNames.ts 100.00% <0.00%> (ø)
...-instrumentation-document-load/src/documentLoad.ts 99.00% <0.00%> (ø)

@obecny obecny requested a review from Flarna May 7, 2021 18:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants