Skip to content

Configure output directory for dumps #170

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

Merged
merged 10 commits into from
Jan 19, 2024
Merged

Conversation

fzhinkin
Copy link
Collaborator

@fzhinkin fzhinkin commented Jan 16, 2024

Added an option to configure a path to a directory where dumps are stored:

apiValidation {
   apiDumpDirectory = "a/b/c/d/e"
}

By default, that path remains api.

It's an error to specify a path that leads outside the project directory.

Fixes #127

@fzhinkin fzhinkin marked this pull request as ready for review January 16, 2024 17:30
@fzhinkin fzhinkin requested review from qwwdfsad and ilya-g January 16, 2024 17:30
Copy link
Member

@qwwdfsad qwwdfsad left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@@ -150,10 +158,10 @@ private class TargetConfig constructor(
val apiDir
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you please move the property above the fun block?

val root = project.layout.projectDirectory.asFile.toPath().toAbsolutePath().normalize()
val resolvedDir = root.resolve(dir).normalize()
if (!resolvedDir.startsWith(root)) {
throw IllegalArgumentException("apiDumpDirectory should be inside the project directory")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consider enriching the message with the contextual information about expected and actual paths

@qwwdfsad
Copy link
Member

(I removed the obsolete comment because I was looking at the wrong branch in my IDE)

@fzhinkin fzhinkin merged commit 4367cb7 into master Jan 19, 2024
@fzhinkin fzhinkin deleted the output-dir-configuration branch January 19, 2024 11:47
shanshin pushed a commit to JetBrains/kotlin that referenced this pull request Oct 28, 2024
* Support output directory configuration

Fixes Kotlin/binary-compatibility-validator#127

---------

Co-authored-by: Vsevolod Tolstopyatov <[email protected]>
Pull request Kotlin/binary-compatibility-validator#170
shanshin pushed a commit to JetBrains/kotlin that referenced this pull request Dec 3, 2024
* Support output directory configuration

Fixes Kotlin/binary-compatibility-validator#127

---------

Co-authored-by: Vsevolod Tolstopyatov <[email protected]>
Pull request Kotlin/binary-compatibility-validator#170
shanshin pushed a commit to JetBrains/kotlin that referenced this pull request Dec 13, 2024
* Support output directory configuration

Fixes Kotlin/binary-compatibility-validator#127

---------

Co-authored-by: Vsevolod Tolstopyatov <[email protected]>
Pull request Kotlin/binary-compatibility-validator#170
shanshin pushed a commit to JetBrains/kotlin that referenced this pull request Dec 23, 2024
KotlinBuild pushed a commit to JetBrains/kotlin that referenced this pull request Jan 3, 2025
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.

Support output folder configuration
2 participants