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

Print warnings when experimental features are used #1920

Merged
merged 7 commits into from Mar 18, 2023

Conversation

Gedochao
Copy link
Contributor

@Gedochao Gedochao commented Mar 13, 2023

Fixes #1281
Using experimental features will now cause Scala CLI to print an appropriate warning.
The warning can be suppressed with the --suppress-experimental-warning option or alternatively with the suppress-warning.experimental-features global config key.

▶ scala-cli config suppress-warning.experimental-features true

Directives:

▶ scala-cli --power -e '//> using publish.name "my-library"'
# The '//> publish.name "my-library"' directive is an experimental feature.
# Please bear in mind that non-ideal user experience should be expected.
# If you encounter any bugs or have feedback to share, make sure to reach out to the maintenance team at https://github.com/VirtusLab/scala-cli
# Compiling project (Scala 3.2.2, JVM)
# Compiled project (Scala 3.2.2, JVM)

Options:

▶ scala-cli --power -e 'println("Hello")' --markdown
# The '--markdown' option is an experimental feature.
# Please bear in mind that non-ideal user experience should be expected.
# If you encounter any bugs or have feedback to share, make sure to reach out to the maintenance team at https://github.com/VirtusLab/scala-cli
# Compiling project (Scala 3.2.2, JVM)
# Compiled project (Scala 3.2.2, JVM)
# Hello

Sub-commands:

▶ scala-cli --power export 
# The 'export' sub-command is an experimental feature.
# Please bear in mind that non-ideal user experience should be expected.
# If you encounter any bugs or have feedback to share, make sure to reach out to the maintenance team at # https://github.com/VirtusLab/scala-cli
# Exporting to a sbt project...
# [error]  No inputs provided (expected files with .scala, .sc, .java or .md extensions, and / or directories).

Sub-commands' help:

▶ scala-cli --power publish -h
# Usage: scala-cli publish [options]
# Publishes build artifacts to Maven repositories.
# 
# You are currently viewing the basic help for the publish sub-command. You can view the full help by running: 
#    scala-cli --power publish --help-full
# For detailed documentation refer to our website: https://scala-cli.virtuslab.org/docs/commands/publishing/publish
# 
# The 'publish' sub-command is an experimental feature.
# Please bear in mind that non-ideal user experience should be expected.
# If you encounter any bugs or have feedback to share, make sure to reach out to the maintenance team at https://github.com/VirtusLab/scala-cli
# 
# Publishing options:
#   --organization string?                         Organization to publish artifacts under
# (...)

@Gedochao Gedochao force-pushed the experimental-warnings branch 4 times, most recently from 2bca1a2 to 7329958 Compare March 16, 2023 10:34
@Gedochao Gedochao marked this pull request as ready for review March 16, 2023 10:36
@Gedochao Gedochao force-pushed the experimental-warnings branch 2 times, most recently from dbca684 to c7202c6 Compare March 16, 2023 14:41
@Gedochao Gedochao force-pushed the experimental-warnings branch 3 times, most recently from 4364cf9 to de56409 Compare March 17, 2023 09:51
@Gedochao Gedochao added enhancement New feature or request UX labels Mar 17, 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.

LGTM

@lwronski lwronski merged commit 3ea5557 into VirtusLab:main Mar 18, 2023
37 checks passed
@Gedochao Gedochao deleted the experimental-warnings branch March 21, 2023 07:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request UX
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Special handling for experimental features
2 participants