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

[ts] disable forceConsistentCasingInFileNames, it seems broken #92849

Merged

Conversation

spalger
Copy link
Contributor

@spalger spalger commented Feb 25, 2021

Fixes #92837

The APM team does not use snake_case filenames like we do in the rest of the repo, so we enabled the forceConsistentCasingInFileNames setting which is supposed to prevent using multiple casings for the same file. It seems though that this consistency is only enforced in certain scenarios which don't include CI or bootstrap in most cases, which is an issue for enforcement.

I think if the APM team really wants to enforce filename consistency they should consider switching to snake_case filenames like we use in the rest of the repo.

cc @elastic/apm-ui

@spalger spalger added Team:Operations Team label for Operations Team v8.0.0 release_note:skip Skip the PR/issue when compiling release notes v7.13.0 labels Feb 25, 2021
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@spalger spalger enabled auto-merge (squash) February 25, 2021 17:37
@spalger spalger added the auto-backport Deprecated - use backport:version if exact versions are needed label Feb 25, 2021
@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

@spalger spalger merged commit 1f58bc2 into elastic:master Feb 25, 2021
kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Feb 25, 2021
…ic#92849)

Co-authored-by: spalger <spalger@users.noreply.github.com>
@kibanamachine
Copy link
Contributor

💚 Backport successful

7.x / #92892

Successful backport PRs will be merged automatically after passing CI.

@spalger spalger deleted the ts/disable-forceConsistentCasingInFileNames branch February 25, 2021 19:23
kibanamachine added a commit that referenced this pull request Feb 25, 2021
… (#92892)

Co-authored-by: spalger <spalger@users.noreply.github.com>

Co-authored-by: Spencer <email@spalger.com>
Co-authored-by: spalger <spalger@users.noreply.github.com>
@smith
Copy link
Contributor

smith commented Mar 1, 2021

I think if the APM team really wants to enforce filename consistency they should consider switching to snake_case filenames like we use in the rest of the repo.

We have been doing this gradually. I usually rename everything I touch in a PR.

@spalger
Copy link
Contributor Author

spalger commented Mar 1, 2021

Thank you @smith!

@sorenlouv
Copy link
Member

@spalger Do you know of any automated tools to do this. As @smith says, we are doing it as we touch files but it's a rather slow process.
Perhaps I should just bite the bullet and do it manually once and for all?

@spalger
Copy link
Contributor Author

spalger commented Mar 2, 2021

I don't know of any automated tool for this, but I do use the changeCase extension in vscode for this type of work:

  • use find to locate all APM files with a capital letter
  • copy the file list
  • craft a list of mv commands to execute in the CLI
  • run eslint on APM files to find unresolved imports
  • capture the list of files, run through each file and select the path and convert it to snake_case

I setup a custom keybinding to the changeCase extensions actions:
image

  // toggle casing
  {
    "key": "cmd+k cmd+s",
    "command": "extension.changeCase.snake"
  },
  {
    "key": "cmd+k cmd+l",
    "command": "extension.changeCase.lower"
  },
  {
    "key": "cmd+k cmd+u",
    "command": "extension.changeCase.upper"
  },
  {
    "key": "cmd+k cmd+c",
    "command": "extension.changeCase.camel"
  },
  {
    "key": "cmd+k cmd+c",
    "command": "-editor.action.commentLine"
  },

@sorenlouv
Copy link
Member

Much appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-backport Deprecated - use backport:version if exact versions are needed release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v7.13.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[dev/build_ts_refs] APM error caused by mixed casing usage
7 participants