-
Notifications
You must be signed in to change notification settings - Fork 74
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
refactor(env-options): migrate test to reduce cyclic dependencies #1896
Conversation
"devDependencies": { | ||
"ava": "^5.1.1" | ||
}, |
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.
Just a drive by, but I noticed this was completely unused. Are there any tools to detect dead dependencies? It would seem to be a simple static check.
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.
We use depcheck
and if I understand it correctly, it should have caught this in its CI job. https://github.com/depcheck/depcheck
@@ -0,0 +1,7 @@ | |||
import '@endo/lockdown/commit-debug.js'; |
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.
Besides migrating, also changed this from '@endo/init/debug.js'
to avoid depending on @endo/eventual-send
yarn.lock
Outdated
@@ -743,6 +743,41 @@ | |||
resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" | |||
integrity sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw== | |||
|
|||
"@endo/env-options@^0.1.4": |
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.
Don't worry yet about these yarn.lock changes. After the current endo-release-agoric_sdk-upgrade dance settles down and I rebase this PR, I see what fresh changes it causes to yarn.lock.
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 separated the yarn.lock changes into a separate commit. Since this PR does involve package.json dependency changes, I doubt I could merge without some yarn.lock changes. However, neither should I commit these as long as #1904 needs investigation.
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.
Merging #1904 and rebasing this PR caused this PR to drop its yarn.lock changes. Redoing yarn
did not create any changes. So this PR is now good to go. Thanks!
bd212a2
to
191c65f
Compare
191c65f
to
126d094
Compare
126d094
to
75e7dd6
Compare
closes: #XXXX
refs: #XXXX
Description
This PR is non-urgent, and so should wait for the current endo-release-agoric_sdk-upgrade dance to settle down.
Currently, before this PR, we get the following cyclic dependency warnings from
yarn build
The @endo/env-option package participates in many of these, due only to a devDependency in support of a test. This PR moves that test to @endo/ses-ava to reduce cyclic dependencies.
Even with the PR, we still get the following cyclic dependency warnings:
These seem also to be cycles through devDependencies, and so should be fixable by the same means (and with the same costs). However, at least one supports usage from a
scripts/*.js
rather than atest/*.js
. Could these be migrated too? What else would need to be adjusted?Security Considerations
None
Scaling Considerations
None
Documentation Considerations
It is weird that the tests of a package are not in that package. As we repair other cyclic dependencies, we're likely to cause more of these surprises.
Testing Considerations
After this PR, no tests remain in @endo/env-options . However, the normal
yarn test
definition is not tolerant of that, so this PR also changes it to"exit 0"
. However, this means that if tests are added in the future, they may silently be ignored.Reviewers, to avoid this problem, should this PR instead leave
yarn test
alone and add a placeholder test instead?Upgrade Considerations
None