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

Addition of one package cause type errors in unrelated packages #2698

Open
erights opened this issue Jan 25, 2025 · 0 comments
Open

Addition of one package cause type errors in unrelated packages #2698

erights opened this issue Jan 25, 2025 · 0 comments
Labels
bug Something isn't working

Comments

@erights
Copy link
Contributor

erights commented Jan 25, 2025

At #2673 (comment)

@kriskowal , at /~https://github.com/endojs/endo/actions/runs/12563852500/job/35026252842?pr=2673 I am getting lint errors that seem clearly unrelated to this PR. Any idea what happened?

Update: See #2676 (comment) , which establishes that these lint errors are somehow dependent on this PR.

Update: The only thing I could think of was the devDepencies from this PR to ses-level stuff. So I removed those, and checked that the resulting yarn.lock entry for no-trapping-shim is like that for immutable-arraybuffer. However, I'm still getting those lint errors, and so am completely flummoxed. Help!

[info] Converting project at ./packages/lockdown
packages/marshal/src/encodeToCapData.js:190:9 - error TS2322: Type '{ [k: string]: string | number | boolean | EncodingClass<"NaN"> | EncodingClass<"undefined"> | EncodingClass<"Infinity"> | EncodingClass<"-Infinity"> | ... 9 more ... | null; }' is not assignable to type 'Encoding'.
  Type '{ [k: string]: string | number | boolean | EncodingClass<"NaN"> | EncodingClass<"undefined"> | EncodingClass<"Infinity"> | EncodingClass<"-Infinity"> | ... 9 more ... | null; }' is not assignable to type 'EncodingClass<"error"> & { name: string; message: string; errorId?: string | undefined; cause?: Encoding | undefined; errors?: Encoding[] | undefined; }'.
    Property ''@qclass'' is missing in type '{ [k: string]: string | number | boolean | EncodingClass<"NaN"> | EncodingClass<"undefined"> | EncodingClass<"Infinity"> | EncodingClass<"-Infinity"> | ... 9 more ... | null; }' but required in type 'EncodingClass<"error">'.

190         return fromEntries(
            ~~~~~~

  packages/marshal/src/types.js:25:16
    25  * @typedef {{ '@qclass': T }} EncodingClass
                      ~~~~~~~~~
    ''@qclass'' is declared here.

packages/pass-style/src/symbol.js:14:7 - error TS2578: Unused '@ts-expect-error' directive.

14       // @ts-expect-error It doesn't know name cannot be a symbol
         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

packages/ses/src/error/assert.js:308:5 - error TS25[78](/~https://github.com/endojs/endo/actions/runs/12564819013/job/35028359869?pr=2673#step:8:79): Unused '@ts-expect-error' directive.

308     // @ts-expect-error TS still confused by symbols as property names
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

packages/ses/src/make-hardener.js:241:21 - error TS2578: Unused '@ts-expect-error' directive.

241                     // @ts-expect-error TS should know FERAL_STACK_GETTER
                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Update workedaround in
7ab2643

That workaround changes the relevant @ts-expect-error directives to @ts-ignore with a TODO comment to either revert or remove the directive.

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

No branches or pull requests

1 participant