Skip to content

build: enforce consistent readonly array type #20290

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

Conversation

rafaelss95
Copy link
Contributor

Relates to:

This PR brings normalization on the form of write readonly arrays: readonly TYPE [].

Note that for some cases, specifically truly constants, I've opted out to use as const as it's shorter and fully immutable without the need of declaring the type.

@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Aug 13, 2020
@rafaelss95 rafaelss95 force-pushed the build/enforce-unique-readonly-array branch from 1c6bbcd to 7275a3f Compare August 13, 2020 03:42
@rafaelss95 rafaelss95 marked this pull request as ready for review August 13, 2020 03:42
Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

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

LGTM, but @jelbourn might have some opinions here.

@@ -7,7 +7,7 @@
*/

import {ViewportRuler} from '@angular/cdk/scrolling';
import {getMutableClientRect, adjustClientRect} from './client-rect';
import {adjustClientRect, getMutableClientRect} from './client-rect';
Copy link
Member

Choose a reason for hiding this comment

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

Note that reordering the imports will make it harder to land and will cause conflicts with existing PRs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note that reordering the imports will make it harder to land and will cause conflicts with existing PRs.

That's my IDE config configuration, it always sorts it alphabetically :)
Anyway, if it causes too much noise, I can disable this configuration and rollback it.

Copy link
Member

Choose a reason for hiding this comment

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

It might be best to roll it back since it causes a lot of churn for existing PRs.

@jelbourn jelbourn added the target: major This PR is targeted for the next major release label Aug 17, 2020
Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM, marking as major out of an abundance of caution, I'd also like @andrewseguin to take a look

@annieyw
Copy link
Contributor

annieyw commented Mar 15, 2021

@andrewseguin

@andrewseguin andrewseguin added the action: merge The PR is ready for merge by the caretaker label Mar 16, 2021
@rafaelss95 rafaelss95 force-pushed the build/enforce-unique-readonly-array branch 3 times, most recently from efde4ef to af70d96 Compare March 17, 2021 23:23
@rafaelss95 rafaelss95 force-pushed the build/enforce-unique-readonly-array branch from af70d96 to 3a8e5f7 Compare March 17, 2021 23:39
@annieyw annieyw merged commit 5384550 into angular:master Apr 2, 2021
@rafaelss95 rafaelss95 deleted the build/enforce-unique-readonly-array branch April 3, 2021 02:31
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators May 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement target: major This PR is targeted for the next major release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants