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

NoRootNamesError: No source files found #976

Closed
kayahr opened this issue Oct 6, 2021 · 8 comments · Fixed by #1010
Closed

NoRootNamesError: No source files found #976

kayahr opened this issue Oct 6, 2021 · 8 comments · Fixed by #1010
Labels
bug help wanted released This issue/pull request has been released.

Comments

@kayahr
Copy link
Contributor

kayahr commented Oct 6, 2021

I just updated from version 0.95.0 to 0.96.0 and the schema generator stopped working, I now get this message:

> ts-json-schema-generator -f tsconfig.json -t Foo > foo.schema.json

NoRootNamesError: No source files found

Can be reproduced with a minimal tsconfig.json (even one containing an empty object) and a simple export interface Foo { bar: string } type. Works with schema generator 0.95.0, but not with 0.96.0

Was there a change in the CLI parameters? I can't find any entry in the changelog which sounds like a CLI change.

And maybe this issue is a good point to discuss the versioning of the the schema-generator. I'm using it for a long time now and I would say the interfaces for which I generate JSON schemas are very complex (Lots of generic types with many mapped types and conditional types for example). And since my last contributions to this project two years ago I never had a problem with it (well, until now). So in my opinion the schema generator is very stable and earns the right to get a production version number. After this the versioning should follow the semver paradigm and the major version number should be incremented when the public API (including the CLI parameters) is no longer compatible to the previous version.

@domoritz
Copy link
Member

domoritz commented Oct 6, 2021

I'm sorry this happened. There shouldn't have been a change. Can you help identify the issue?

Yes, you are right that we are pretty stable and we could bump to 1.0. We definitely need to find out what happened here and how to avoid it in the future.

@domoritz
Copy link
Member

domoritz commented Oct 7, 2021

Hmm, looks like we don't resolve paths correctly in the first place.

$ yarn run run -f ./node_modules/vega-lite/tsconfig.json -t AggregateOp
error TS6053: File 'node_modules/vega-lite/node_modules/vega-lite/src/index.ts' not found.
  The file is in the program because:
    Root file specified for compilation

I fixed that in #979.

Could you try the version from the pr?

@kayahr
Copy link
Contributor Author

kayahr commented Oct 7, 2021

Yes, #979 fixes the problem.

@domoritz
Copy link
Member

Unfortunately, it breaks some tests. If you have time, please help fix it.

@vega-org-bot
Copy link
Collaborator

🚀 Issue was released in v0.97.0 🚀

@vega-org-bot vega-org-bot added released This issue/pull request has been released. and removed prerelease labels Nov 4, 2021
@crobinson42
Copy link

FYI - The PR The PR mentioned was not merged and is still open #979.

@domoritz
Copy link
Member

Hmm, #1010 resolved this. What went wrong?

@crobinson42
Copy link

Ahh, sorry - I was quick on the trigger. the 2 PR's both attempted the same fix, #1010 was merged and the former was not. 🤦‍♂️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug help wanted released This issue/pull request has been released.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants