Conversation
| }, | ||
| }, | ||
| additionalProperties: false, | ||
| }, |
There was a problem hiding this comment.
Hm, does this actually work?
Based on the comment above, I really doubt it.
But we can probably revisit configuration validation some time soon.
There was a problem hiding this comment.
Not sure :) I only added it for completeness since I saw the others. Certainly doesn't hurt.
|
This still needs tests. |
cd20279 to
ba4471f
Compare
|
@tonyo should be ready now (if the Docker image builds). Added tests, too. |
| process.env.CRATES_IO_TOKEN = 'xxx'; | ||
| const target = new CratesTarget({}, new NoneArtifactProvider()); | ||
| const target = new CratesTarget( | ||
| { noDevDeps: true }, |
There was a problem hiding this comment.
nit: would be nice to add an interface for CratesTargetConfig (since it's not automatically generated now).
There was a problem hiding this comment.
Do you have an example for where to put and enforce this? I looked into the other targets, but they all receive an any config.
There was a problem hiding this comment.
They do, but then we perform manual validation, e.g. https://github.com/getsentry/craft/blob/master/src/targets/npm.ts#L131-L158
There was a problem hiding this comment.
Excellent, thanks. Added.
e2c811e to
985ab87
Compare
|
Travis is not reporting status. Adding a very useful reformat commit to trigger. |
|
This is the passing PR build: https://travis-ci.org/github/getsentry/craft/builds/699788879 |
|
yow low |
* master: (23 commits) feat(crates): Add noDevDeps option (#112) fix: Write to cache in base artifact provider fix: Logger scopes for gcs and artifact providers build(ci): Have better defaults for CI environments (#110) fix(gha): Use single quotes for string literals (#108) ref(gha): Remove ENV inputs, add no-merge and keep-branch (#107) fix(docker): Fix CARGO_HOME and RUST_HOME since GHA changes HOME (#106) docs: Add missing CHANGELOG entry for cargo upgrade (#105) build(docker): Upgrade cargo to a recent version (#104) fix(gha): Remove no-merge and keep-branch temporarily fix(gha): Try to skip empty args using null fix(gha): Remove defaults on craft arguments fix(gha): Only pass publish args to publish feat(gha): Add GitHub Action for Craft (#103) docs: Fix `changelogPolicy` enum (#102) build(docker): Add a `craft` binary into the Docker image (#101) docs: Fix `artifactProvider` example (#100) release: 0.10.0 meta: Update Changelog build(gcb): Add a public Docker image (#99) ...
Cargo does not allow to publish crates with circular dependencies. In dev dependencies, they would theoretically be fine since they are not required to run or build the crate. We need them in the Rust SDK to provide proper doc comments in sub-crates.
This PR adds a new
noDevDepsoption, which usescargo hackto strip dev dependencies before publishing.