-
Notifications
You must be signed in to change notification settings - Fork 532
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
Test/internal merge tree client #22697
base: main
Are you sure you want to change the base?
Conversation
…to prototype-deprecate-client
…to test/internal-merge-tree-client
…to test/internal-merge-tree-client
⯆ @fluid-example/bundle-size-tests: -165 Bytes
Baseline commit: 30003a8 |
…to test/internal-merge-tree-client
7e8d1c7
to
2ae3b9e
Compare
…to test/internal-merge-tree-client
…to test/internal-merge-tree-client
…to test/internal-merge-tree-client
…to test/internal-merge-tree-client
packages/dds/merge-tree/api-report/merge-tree.legacy.alpha.api.md
Outdated
Show resolved
Hide resolved
…to test/internal-merge-tree-client
@@ -193,6 +193,7 @@ | |||
}, | |||
"typeValidation": { | |||
"broken": {}, | |||
"disabled": true, |
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.
Why full stop disable? Isn't this exactly the case where we want to list the incompatibilities? Is another option to change entrypoint from "legacy" to "public"?
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.
things like the 2.4 release and other changes create lots of merge conflicts. i don't want to deal with merge conflict right now. once we are closer to the merge point i'll remove it and deal with them
…to test/internal-merge-tree-client
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.
Shouldn't you be able to make many of the test changes before the breaking change?
When we have a well staged deprecation, I would expect to see more removal of things we don't have to test for anymore compared to test adaptation. The latter suggests customers need to adapt too. OR we don't have good coverage on the external facing APIs which also hinders confidence.
import { | ||
IIntervalHelpers, | ||
ISerializableInterval, | ||
ISerializedInterval, | ||
IntervalStickiness, | ||
IntervalType, | ||
endReferenceSlidingPreference, | ||
startReferenceSlidingPreference, | ||
type IIntervalHelpers, | ||
} from "./intervalUtils.js"; |
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.
I thought the sorting would still want type IIntervalHelpers
first.
Other pattern that has no such confusion is to have separate import type {}
block. We do that more now.
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.
i don't know. i just let the formatter do what it wants.
readonly stickiness: IntervalStickiness; | ||
} | ||
|
||
export class SequenceIntervalClass implements SequenceInterval { |
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.
This should have an explicit tsdoc and @internal
tag. No complaints from the tooling?
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.
no it shouldn't, it's never exported from the package
that is not possible given the changes. the changes literally rename the class and make it un-exported |
Just having another staging thought. For the cases where you now have a FooClass and Foo is interface, I think you can currently do |
i don't understand this comment. i'm not exporting anything concrete. classes are being replaced with interfaces, nothing but types are exported |
I am not sure I follow. Either you are doing non-"public" testing and still internally "export"ing the class or you shouldn't need to access the class beyond its instance type (no ctor) for testing. |
the test's are for implementations, they unit test the actual class which is only ever constructed within the package, consumers only ever see the interface. The tests pay the cost of dealing with the rename, and the interface get the original name, so customers don't have to change anything. |
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.
Code Coverage Summary
↓ packages.dds.merge-tree.src:
Line Coverage Change: -0.01% Branch Coverage Change: -0.01%
Metric Name | Baseline coverage | PR coverage | Coverage Diff |
---|---|---|---|
Branch Coverage | 94.90% | 94.89% | ↓ -0.01% |
Line Coverage | 97.08% | 97.07% | ↓ -0.01% |
↑ packages.dds.sequence.src:
Line Coverage Change: 0.07% Branch Coverage Change: -0.05%
Metric Name | Baseline coverage | PR coverage | Coverage Diff |
---|---|---|---|
Branch Coverage | 89.47% | 89.42% | ↓ -0.05% |
Line Coverage | 89.74% | 89.81% | ↑ 0.07% |
↑ packages.dds.sequence.src.intervalIndex:
Line Coverage Change: 0.03% Branch Coverage Change: No change
Metric Name | Baseline coverage | PR coverage | Coverage Diff |
---|---|---|---|
Branch Coverage | 92.55% | 92.55% | → No change |
Line Coverage | 87.31% | 87.34% | ↑ 0.03% |
↑ packages.dds.sequence.src.intervals:
Line Coverage Change: 0.03% Branch Coverage Change: No change
Metric Name | Baseline coverage | PR coverage | Coverage Diff |
---|---|---|---|
Branch Coverage | 89.47% | 89.47% | → No change |
Line Coverage | 96.22% | 96.25% | ↑ 0.03% |
Baseline commit: 30003a8
Baseline build: 303240
Happy Coding!!
Code coverage comparison check passed!!
…to test/internal-merge-tree-client
…to test/internal-merge-tree-client
…to test/internal-merge-tree-client
…to test/internal-merge-tree-client
🔗 No broken links found! ✅ Your attention to detail is admirable. linkcheck output
|
@@ -87,104 +78,6 @@ export abstract class BaseSegment implements ISegment { | |||
wasMovedOnInsert?: boolean | undefined; | |||
} | |||
|
|||
// @alpha @deprecated (undocumented) | |||
export class Client extends TypedEventEmitter<IClientEvents> { |
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.
@tylerbutler do you know why these type removals don't break the type tests? i would expect those to need suppression, but they don't for some reason.
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.
i guess it makes sense if the look at the imports
import type * as old from "@fluidframework/merge-tree-previous/internal";
import type * as current from "../../index.js";
as the types still exist off internal, just not legacy, so are still available off import type * as current from "../../index.js";
however, i would expect this to be a breaking change, as something that was exported at one layer, is no longer exported.
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.
- @CraigMacomber as type test collaborator.
I think there was a task out there to test against the entrypoints directly. I think that may have been mutated to read the tags so that all pulled into a single file without any duplication. I still think that using the entrypoints directly has merit. Especially relevant if we hand craft any entrypoints, which would allow deviation from tags.
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.
I looked over this more and tried to separate more work that can be done right now as I had been mentioning in other comments. From that I produced #22948. Have a look.
I also have the remainder of the changes in a stash. Final result is not identical to this as I made some fixes.
I think the ideal process for these overall changes are:
- improvement(client): deprecation cleanup #22948
- just breaks (blocked on 2.10 opening)
- more taking advantage of the breaks (change internals)
The healthiest way to maintain 2 & 3 over time is likely to be having branch with two commits and rebasing over main when desired.
@@ -87,104 +78,6 @@ export abstract class BaseSegment implements ISegment { | |||
wasMovedOnInsert?: boolean | undefined; | |||
} | |||
|
|||
// @alpha @deprecated (undocumented) | |||
export class Client extends TypedEventEmitter<IClientEvents> { |
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.
- @CraigMacomber as type test collaborator.
I think there was a task out there to test against the entrypoints directly. I think that may have been mutated to read the tags so that all pulled into a single file without any duplication. I still think that using the entrypoints directly has merit. Especially relevant if we hand craft any entrypoints, which would allow deviation from tags.
in progress