Skip to content
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

Support declaring some test directives from the main scope #2046

Merged
merged 8 commits into from
Apr 25, 2023

Conversation

Gedochao
Copy link
Contributor

@Gedochao Gedochao commented Apr 19, 2023

Fixes #1729

Some select directives (and not others) can now be declared for the test scope even in main scope sources.
Those now support a separate key with the test.* prefix, indicating the test scope target.
The recommended location for declaring such directives would be the optional project.scala configuration file.

Directives supporting this feature:

//> using test.jar "<custom jar path>"
//> using test.dep "<dependency>"
//> using test.option "<scalac option>"
//> using test.javacOpt "<javac option>"
//> using test.javaOpt "<java option>"
//> using test.javaProp "<java properties>"
//> using test.toolkit "latest"
//> using test.resourceDir "<resources directory>"

@Gedochao Gedochao added the enhancement New feature or request label Apr 19, 2023
@Gedochao Gedochao force-pushed the test-scope-deps-from-main branch 5 times, most recently from 5b19909 to b71694d Compare April 20, 2023 11:44
@Gedochao Gedochao changed the title [WIP] Support declaring test dependencies from the main scope [WIP] Support declaring some test directives from the main scope Apr 21, 2023
@Gedochao Gedochao marked this pull request as ready for review April 24, 2023 09:54
@Gedochao Gedochao changed the title [WIP] Support declaring some test directives from the main scope Support declaring some test directives from the main scope Apr 24, 2023
Copy link
Contributor

@lwronski lwronski left a comment

Choose a reason for hiding this comment

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

Add explanation in the directive guide about the test. prefix, and include a list of the available options.

@Gedochao
Copy link
Contributor Author

Add explanation in the directive guide about the test. prefix, and include a list of the available options.

@lwronski I'll do a followup PR with refactorings and docs, don't want to make this one bigger

@Gedochao Gedochao merged commit 2c57665 into VirtusLab:main Apr 25, 2023
@Gedochao Gedochao deleted the test-scope-deps-from-main branch April 25, 2023 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Defining project.scala dependencies in test scope?
2 participants