-
Notifications
You must be signed in to change notification settings - Fork 41
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
Minor improv. on testing-plugin
& public CompilationResult
#53
Conversation
@@ -49,7 +49,7 @@ class ComprehensionsTest { | |||
listOf(addCompilerPlugins(compilerPlugin)) | |||
}, | |||
code = { | |||
codeSnippet.source |
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'd keep it because of: avoiding the use of primitives types, better types and it's planned to have several sources.
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.
May you reiterate on what you mean with multiple sources?
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 mean about different snippets.
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.
that should be isomorphic to List<Source>
. What am indicating here is that your not doing anything to your DataType which is domain-specific other than renaming String
to Source
val actualStatus: CompilationStatus, | ||
val log: String, | ||
val actualGeneratedFilePath: Path, | ||
val classesDirectory: File |
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.
There are different directories and we only use classes directory. I think outputDirectory could be confused with the outputDirectory of the testing library.
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.
where is the outputDirectory of the testing library. I couldnt find it.
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.
line 33
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.
So, you're saying that classesDirectory
is the same as outputDirectory
?
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.
They are different. That's the reason why I chose classesDirectory
...
@@ -10,11 +10,11 @@ import java.nio.file.Paths | |||
|
|||
private const val DEFAULT_FILENAME = "Example.kt" | |||
|
|||
internal data class CompilationResult( | |||
data class CompilationResult( |
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.
Instead of doing CompilationResult public, I'd think about the desired assertion. The purpose of this library is to provide a simple testing framework. If we publish the compilationResult, it seems this library doesn't make sense and we might use the kotlin compiler testing library directly.
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 am not writing an assertion
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 need the testing-library
with the wrappers we added in testing-library
. For the IDE
it's a utility.
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.
Please, could you give more details?
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.
About what specifically?
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.
About the use of the library in IDE...
@i-walker , despite of the comments, thanks for this pull request!! I think it could be useful to think about the code you'd like to be able to write. What's the desired assertion you would like to write? And then, we could think about how to change the library. |
Another idea, @i-walker: use directly kotlin compiler testing library and then we'll think about a way to move your need to this library. I hope it's useful for you 🙏 |
We can also focus on the more pressing issue, that other libraries won't be able to pull
|
This is a blocker for us because we already tried workarounds and pulling the underlying library directory and copy-pasting the code from |
Sorry, I don't understand this error. We are not deploying that library in oss.jfrog.org. We're using JitPack to get that dependency. |
Ok. How can we add testing-plugin to the dependencies in idea-plugin? |
# Conflicts: # testing-plugin/src/main/kotlin/arrow/meta/plugin/testing/CompilationAssertions.kt # testing-plugin/src/main/kotlin/arrow/meta/plugin/testing/CompilerTestDSL.kt
It's already included in
because testing-plugin is using the dependency of cc: @jansorg |
Closing this |
In order for us to have
HeavyTests
in theide
, which verify thatMetaSyntheticPackageFragementProvider
does its job and all PsiElements result in with valid references to their typeclass, we need theoutputdirectory
inCompilationResult
classesfiles
. I renamed it for coherence. Concluding that theCompilationResult
DT is public, but ourinterpreter
is still internal and not discoverable for users.I am open to Feedback, separating the compilation and the actual interpretation of that result seems also to be a good pattern.
Contrary, if we don't make
CompilationResult
public we can't establishHeavyTests
in testing. As there is no way for us to generate the metadata in the editor.