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

[dev/build_ts_refs] APM error caused by mixed casing usage #92837

Closed
spalger opened this issue Feb 25, 2021 · 3 comments · Fixed by #92849
Closed

[dev/build_ts_refs] APM error caused by mixed casing usage #92837

spalger opened this issue Feb 25, 2021 · 3 comments · Fixed by #92849
Labels
bug Fixes for quality problems that affect the customer experience dev Team:APM All issues that need APM UI Team support Team:Operations Team label for Operations Team

Comments

@spalger
Copy link
Contributor

spalger commented Feb 25, 2021

I'm seeing a TypeScript error locally seemingly caused by an import in APM which was seemingly merged over a week ago... but the error seems legitimate because in all but one location APM is importing from ../Correlations but in only one location from ../correlations (lowercase c), so it seems the forceConsistentCasingInFileNames setting from tsconfig.base.json is not being enforced correctly for some reason.

#89952

$ node scripts/build_ts_refs
 info ensuring we have the latest changelog from upstream master
 info determining merge base with upstream
 info merge base with master is 805e729bdbc67be0414b925699c14f1601449a7d
 debg all outDirs have a recent cache
 debg Building TypeScript projects refs for tsconfig.refs.json...
ERROR UNHANDLED ERROR
ERROR Error: Command failed with exit code 2: /Users/spalger/kbn-dev/master/kibana/node_modules/typescript/bin/tsc -b tsconfig.refs.json --pretty
      x-pack/plugins/apm/public/components/app/correlations/custom_fields.tsx:21:31 - error TS1261: Already included file name '/Users/spalger/kbn-dev/master/kibana/x-pack/plugins/apm/public/components/app/correlations/use_field_names.ts' differs from file name '/Users/spalger/kbn-dev/master/kibana/x-pack/plugins/apm/public/components/app/Correlations/use_field_names.ts' only in casing.

      21 import { useFieldNames } from './use_field_names';
                                       ~~~~~~~~~~~~~~~~~~~

      x-pack/plugins/apm/public/components/app/correlations/latency_correlations.tsx:27:8 - error TS1261: Already included file name '/Users/spalger/kbn-dev/master/kibana/x-pack/.plugins/apm/public/components/app/correlations/correlations_table.tsx' differs from file name '/Users/spalger/kbn-dev/master/kibana/x-pack/plugins/apm/public/components/app/Correlations/correlations_table.tsx' only in casing.

      27 } from './correlations_table';
                ~~~~~~~~~~~~~~~~~~~~~~

      x-pack/plugins/apm/public/components/app/correlations/latency_correlations.tsx:30:48 - error TS1261: Already included file name '/Users/spalger/kbn-dev/master/kibana/x-pack/plugins/apm/public/components/app/correlations/custom_fields.tsx' differs from file name '/Users/spalger/kbn-dev/master/kibana/x-pack/plugins/apm/public/components/app/Correlations/custom_fields.tsx' only in casing.

      30 import { CustomFields, PercentileOption } from './custom_fields';
                                                        ~~~~~~~~~~~~~~~~~

      x-pack/plugins/apm/public/components/app/correlations/index.tsx:27:37 - error TS1261: Already included file name '/Users/spalger/kbn-dev/master/kibana/x-pack/plugins/apm/public/components/app/correlations/latency_correlations.tsx' differs from file name '/Users/spalger/kbn-dev/master/kibana/x-pack/plugins/apm/public/components/app/Correlations/latency_correlations.tsx' only in casing.

      27 import { LatencyCorrelations } from './latency_correlations';
                                             ~~~~~~~~~~~~~~~~~~~~~~~~

      x-pack/plugins/apm/public/components/app/correlations/index.tsx:28:35 - error TS1261: Already included file name '/Users/spalger/kbn-dev/master/kibana/x-pack/plugins/apm/public/components/app/correlations/error_correlations.tsx' differs from file name '/Users/spalger/kbn-dev/master/kibana/x-pack/plugins/apm/public/components/app/Correlations/error_correlations.tsx' only in casing.

      28 import { ErrorCorrelations } from './error_correlations';
                                           ~~~~~~~~~~~~~~~~~~~~~~

      x-pack/plugins/apm/public/components/app/service_details/service_detail_tabs.tsx:34:30 - error TS1261: Already included file name '/Users/spalger/kbn-dev/master/kibana/x-pack/plugins/apm/public/components/app/correlations/index.tsx' differs from file name '/Users/spalger/kbn-dev/master/kibana/x-pack/plugins/apm/public/components/app/Correlations/index.tsx' only in casing.

      34 import { Correlations } from '../correlations';
                                      ~~~~~~~~~~~~~~~~~


      Found 6 errors.

Changing https://github.com/elastic/kibana/blame/6b91f480f55d30626773e29dc4a5258fc3285496/x-pack/plugins/apm/public/components/app/service_details/service_detail_tabs.tsx#L34 to import from '../Correlations' removes these errors, but I'm hesitant to propose that change as this seems like an issue we should try to avoid some other way...

@spalger spalger added bug Fixes for quality problems that affect the customer experience dev Team:Operations Team label for Operations Team Team:APM All issues that need APM UI Team support labels Feb 25, 2021
@elasticmachine
Copy link
Contributor

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

@elasticmachine
Copy link
Contributor

Pinging @elastic/apm-ui (Team:apm)

@spalger
Copy link
Contributor Author

spalger commented Feb 25, 2021

From some side discussion it sounds like @restrry ran into this error right after #89952 was merged, though it went away by blowing out the cached target dirs for some reason. It seems like the forceConsistentCasingInFileNames setting in our tsconfig.base.json file isn't being applied consistently, as CI should have caught this and prevented the change from being merged, so I think I'm in support for disabling that setting and moving on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience dev Team:APM All issues that need APM UI Team support Team:Operations Team label for Operations Team
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants