Skip to content

added spec to test all DefinitelyTyped packages #102

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SrTobi
Copy link

@SrTobi SrTobi commented Jun 16, 2019

I think it's a good idea to test against the DefinitelyTyped code base.
This pr adds a spec that tries to import every project on DefinitelyTyped (output goes into a temporary file).

It yields (at the moment) 5935 test cases.
image
(this incorporates some of the currently open prs)

I'm not really happy with how DefinitelyTyped has to be cloned manually into the root directory at the moment. I tried to do it with sbt, but in the end the manual way was easier and works just as good 😄. I made a small script that makes it even easier

@sjrd
Copy link
Owner

sjrd commented Jun 16, 2019

Thank you for your interest.

I'm afraid there are several issues with trying to do this:

  • Currently the test suite doesn't pass, and the CI even less so. We can't consider this PR until the CI passes, one way or another, as otherwise new failures will be hidden by those.
  • Even if the CI passes now, depending on the master of DefinitelyTyped is a volatile dependency, which means that upstream changes can break our build at any time.

@SrTobi
Copy link
Author

SrTobi commented Jun 16, 2019

yeah, I see what you mean. I still think this is a good idea to have this, in order to find bugs.

Not sure how to proceed though... there are clearly more things that have to be fixed until this will be a passing test... I would suggest to set it to ignore but then it will stiff fail for people running all tests locally.

But I am right in assuming that all valid typedefinitions should be importable by this tool, right?

For the issue regarding master dependencies, we could use the current hash of master.

@sjrd
Copy link
Owner

sjrd commented Jun 17, 2019

Maybe you could use a blacklist of tests that are known not to pass?

I'm not really happy with how DefinitelyTyped has to be cloned manually into the root directory at the moment. I tried to do it with sbt, [...]

You can do it like at
https://github.com/scala-js/scala-js/blob/7a794db9d91b68c6f4ba7d28e52eb09d5c9c6127/project/Build.scala#L1693-L1720

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants