-
Notifications
You must be signed in to change notification settings - Fork 157
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
feat(typedoc) - add typedoc to the repo #755
Conversation
Before we proceed with this PR, could you please elaborate on the benefits of adding typedoc in the associated issue? |
replied on the issue.. |
First off, great initiative on adding TypeDoc for auto-generating documentation. This could be a huge win for developer experience and maintainability of this project. However, I do have some clarifications I'd like to ask about this PR:
|
|
I wonder if it might be more common for users to view TypeDoc files via a web page rather than opening HTML files locally. Perhaps it could be beneficial to automatically generate the latest documentation and serve it through a web page. Then we don't have to include html files in our VCS. What are your thoughts on this approach? |
Yea exactly what is mentioned in the comment above. For now the typedocs are saved in the docs folder, which is hosted via github pages -> one could navigate through there but it's not very user friendly without any navbar to navigate there directly. Hence we need to think about how we will display all our documentation going forward. |
Nice @ctrlc03 ! Are you able to generate the pages locally? I tried pulling this down locally & running it. Got these errors:
|
fyi: I was able to generate typedocs. my environment:
my steps:
|
did you run install, bootstrap, build before? @samajammin |
Ok so ran:
All good, but failed on bootstrap (same issue as earlier this week):
So I tried rebasing this branch off dev, which got me past bootstrap step, but then build fails 🤷
Any ideas? |
Here's my env:
|
Also confirming that if I go through everything on
|
package.json
Outdated
}, | ||
"author": "", | ||
"devDependencies": { | ||
"@types/jest": "^29.5.6", |
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 wonder if this is why builds fail for me? Something related to the jest types is failing...
~/code/pse/maci on feat/typedocs [⇕$!] via ⬢ v18.18.2
➜ npm run build
> [email protected] build
> lerna run build
lerna notice cli v6.0.3
✔ maci-crypto:build (2s)
✔ maci-domainobjs:build (2s)
✔ maci-core:build (2s)
✖ maci-circuits:build
> [email protected] build
> tsc
../node_modules/@types/jest/index.d.ts(2,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'beforeEach' must be of type 'HookFunction', but here has type 'Lifecycle'.
../node_modules/@types/jest/index.d.ts(4,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'afterEach' must be of type 'HookFunction', but here has type 'Lifecycle'.
../node_modules/@types/jest/index.d.ts(5,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'describe' must be of type 'SuiteFunction', but here has type 'Describe'.
../node_modules/@types/jest/index.d.ts(7,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'xdescribe' must be of type 'PendingSuiteFunction', but here has type 'Describe'.
../node_modules/@types/jest/index.d.ts(8,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'it' must be of type 'TestFunction', but here has type 'It'.
../node_modules/@types/jest/index.d.ts(10,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'xit' must be of type 'PendingTestFunction', but here has type 'It'.
../node_modules/@types/jest/index.d.ts(11,13): error TS2403: Subsequent variable declarations must have the same type. Variable 'test' must be of type 'TestFunction', but here has type 'It'.
../node_modules/@types/jest/index.d.ts(1198,22): error TS2344: Type 'T' does not satisfy the constraint 'new (...args: any) => any'.
Type 'abstract new (...args: any) => any' is not assignable to type 'new (...args: any) => any'.
Cannot assign an abstract constructor type to a non-abstract constructor type.
../node_modules/@types/jest/index.d.ts(1199,31): error TS2344: Type 'T' does not satisfy the constraint 'new (...args: any) => any'.
Type 'abstract new (...args: any) => any' is not assignable to type 'new (...args: any) => any'.
Cannot assign an abstract constructor type to a non-abstract constructor type.
————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
> Lerna (powered by Nx) Ran target build for 7 projects (7s)
✔ 3/4 succeeded [0 read from cache]
✖ 1/4 targets failed, including the following:
- maci-circuits:build
Ah, interesting, looks like maybe some jest <> mocha clashing on the type defintions?
|
This seems to fix the issue: https://stackoverflow.com/questions/55680391/typescript-error-ts2403-subsequent-variable-declarations-must-have-the-same-typ i.e. adding this to
Not sure if we SHOULD add that though... any thoughts? 🤔 |
So now build passes but still failures running docs 😖
I suspect more mocha/jest clash or import issues? |
e919a70
to
22f0029
Compare
❌ Deploy Preview for candid-cranachan-1cd06a failed.
|
…e same across all packages
22f0029
to
a89c32f
Compare
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.
Everything now working on my end! I believe #819 fixed all my dependency issues.
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.
LGTM
fix #754