jitsi / lib-jitsi-meet

A low-level JS video API that allows adding a completely custom video experience to web apps.
Apache License 2.0
1.33k stars 1.11k forks source link

CI/Build Issue #2418

Open DanielMcAssey opened 9 months ago

DanielMcAssey commented 9 months ago

Just had a look at the latest .tar.gz after the fixes for the types, it looks like the index.d.ts did not get re-generated, or its cached?

Also the types/auto directory is still there.

Specifically this version: https://github.com/jitsi/lib-jitsi-meet/releases/tag/v1745.0.0%2B47fc0fbb

DanielMcAssey commented 9 months ago

Just had a look, need a few more changes to the type generation, theres an issue with inferring types.

Not sure why the auto directory is still there though

DanielMcAssey commented 9 months ago

Issue with typescript on generating types that override the constructor, https://github.com/microsoft/TypeScript/pull/53266

DanielMcAssey commented 9 months ago

@saghul seems to fix the constructor typescript generate problem, we need to upgrade typescript 1 major version to at least 5.1.3 (The first version to include that fix). Ideally to the latest 5.3.3, am I okay to create a PR that does this?

For reference this is the last outstanding issue:

Error: node_modules/lib-jitsi-meet/index.d.ts:3120:20 - error TS1005: '(' expected.

3120         constructor: typeof JitsiTrackError;
                        ~

Error: node_modules/lib-jitsi-meet/index.d.ts:13842:20 - error TS1005: '(' expected.

13842         constructor: typeof JitsiConference;
                         ~

Because of: https://github.com/jitsi/lib-jitsi-meet/blob/47fc0fbbbe2e43ca8ab33e607eb925a56c704463/JitsiConference.js#L328 and https://github.com/jitsi/lib-jitsi-meet/blob/47fc0fbbbe2e43ca8ab33e607eb925a56c704463/JitsiTrackError.js#L139

saghul commented 9 months ago

Just had a look at the latest .tar.gz after the fixes for the types, it looks like the index.d.ts did not get re-generated, or its cached?

We use a prepare script: https://github.com/jitsi/lib-jitsi-meet/blob/47fc0fbbbe2e43ca8ab33e607eb925a56c704463/package.json#L76 I wonder if we need to delete the file before running it?

Also the types/auto directory is still there.

That must be because we don't clean the directory. @damencho Can we perhaps add a git clean -dfx before we start the build process? I forgot where that script is.

saghul commented 9 months ago

am I okay to create a PR that does this?

Absolutely!

damencho commented 9 months ago

That must be because we don't clean the directory. @damencho Can we perhaps add a git clean -dfx before we start the build process? I forgot where that script

On ci, there is a build job.

damencho commented 9 months ago

Let's extract whatever we can from there and add it as a script here, the way we have it already for jibri and jvb.

saghul commented 9 months ago

Not sure I follow.

damencho commented 9 months ago

Have these here https://github.com/jitsi/jibri/blob/master/resources/jenkins/build.sh

https://github.com/jitsi/jibri/blob/master/resources/jenkins/release.sh

So we can control scripts from the source code and not from jenkins job.

damencho commented 9 months ago

We have similar for jvb https://github.com/jitsi/jitsi-videobridge/tree/master/resources/jenkins

We have been doing that for every project that we move to the new version with the git hash, that is the plan and for jitsi-meet for the last 5 years :) One day ...