-
Notifications
You must be signed in to change notification settings - Fork 4.7k
chore: make cyclic deps check an error #38543
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
Changes from 4 commits
086bd6e
370b0e5
903a8e4
fc56f5a
d774508
fecf2d4
086cc7a
116dc9b
12c0947
b09518e
6ea01fa
ef115da
4acb4e2
8aa14a5
846eed4
f4a948b
7d4dece
c053aeb
e1e0742
658e605
66fd9f8
b993677
b4e9182
57e0bd3
49cca4c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| import type { Attributes as OTELAttributes } from "@opentelemetry/api"; | ||
| import type { Span } from "./types"; | ||
| export type Attributes = OTELAttributes; | ||
|
|
||
| export interface DummyType { | ||
| attributes: OTELAttributes; | ||
| span: Span; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,12 @@ | ||
| import type { | ||
| Attributes as OTELAttributes, | ||
| TimeInput, | ||
| Span as OTELSpan, | ||
| } from "@opentelemetry/api"; | ||
| import type { TimeInput, Span as OTELSpan } from "@opentelemetry/api"; | ||
| import type { Attributes as DummyAttributes } from "./dummy"; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Remove circular dependency with dummy.ts This file imports from Move shared types to a common file: - import type { Attributes as DummyAttributes } from "./dummy";
+ import type { Attributes } from "./commonTypes";
|
||
|
|
||
| export interface WebworkerSpanData { | ||
| attributes: OTELAttributes; | ||
| attributes: DummyAttributes; | ||
| spanName: string; | ||
| startTime: TimeInput; | ||
| endTime: TimeInput; | ||
| } | ||
|
|
||
| export type Attributes = OTELAttributes; | ||
| export type Span = OTELSpan; | ||
| export type Attributes = DummyAttributes; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Break the cyclic dependency with types.ts
There's a circular dependency between this file and
types.ts. This file importsSpanfrom./typeswhiletypes.tsimportsAttributesfrom here.Consider moving common types to a separate types file to break this cycle. For example: