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

8.4-RC1: Release notes: Confusing sample of the configuration api #26504

Closed
hfhbd opened this issue Sep 25, 2023 · 2 comments
Closed

8.4-RC1: Release notes: Confusing sample of the configuration api #26504

hfhbd opened this issue Sep 25, 2023 · 2 comments
Labels
a:documentation Documentation content in:dependency-declarations variant notation attributes capability substitution re:comprehensibility reasonable errors and warnings, clear dsl, mental overload
Milestone

Comments

@hfhbd
Copy link
Contributor

hfhbd commented Sep 25, 2023

Issue type

Wrong or misleading information

Problem description

The sample of the old configuration api only sets the non-default properties to false. This code is correct, but confusing due the similar property names. Instead, also add the default value to highlight the new improved api:

configurations {
    create("implementation") { 
        isCanBeConsumed = false
        isCanBeResolved = false
        isCanBeDeclared = true
    }
    create("runtimeClasspath") { 
        isCanBeConsumed = false
        isCanBeResolved = true
        isCanBeDeclared = false
        extendsFrom(configurations["implementation"]) 
    }
    create("runtimeElements") { 
        isCanBeConsumed = true
        isCanBeResolved = false
        isCanBeDeclared = false
        extendsFrom(configurations["implementation"]) 
    }
}

Also, please, change the order of the new usage and use the same names:

configurations { 
    dependencyScope("implementation")
    resolvable("runtimeClasspath") {
        extendsFrom(configurations["apiElements"]) 
    }
    consumable("runtimeElements") { 
        extendsFrom(configurations["implementation"]) 
    }
}

Context (optional)

I was unable to create a PR because I don't know where the release notes are stored, the master branch contains the new release notes of 8.5

Page with the problem

https://docs.gradle.org/8.4-rc-1/release-notes.html

@hfhbd hfhbd added a:documentation Documentation content to-triage labels Sep 25, 2023
@jbartok jbartok added this to the 8.4 RC2 milestone Sep 25, 2023
@jbartok jbartok added in:dependency-declarations variant notation attributes capability substitution and removed to-triage labels Sep 25, 2023
@jbartok
Copy link
Member

jbartok commented Sep 25, 2023

Thank you for your interest in Gradle!

This is a valid documentation issue that we will address.


We should add an in-line comment on the declarations that match the default, to clary that they match the default:
isCanBeDeclared = true // this is the default

@tresat tresat added the re:comprehensibility reasonable errors and warnings, clear dsl, mental overload label Sep 25, 2023
jvandort added a commit that referenced this issue Sep 26, 2023
The existing release notes had some problems.

Fixes #26504
jvandort added a commit that referenced this issue Sep 26, 2023
The existing release notes had some problems.

Fixes #26504
@jvandort
Copy link
Member

@hfhbd PTAL #26524

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a:documentation Documentation content in:dependency-declarations variant notation attributes capability substitution re:comprehensibility reasonable errors and warnings, clear dsl, mental overload
Projects
None yet
Development

No branches or pull requests

5 participants