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

Weird warnings about duplicate declarations #2358

Closed
Nokel81 opened this issue Aug 3, 2023 · 4 comments
Closed

Weird warnings about duplicate declarations #2358

Nokel81 opened this issue Aug 3, 2023 · 4 comments
Labels
bug Functionality does not match expectation needs reproduction Needs a minimal reproducible case

Comments

@Nokel81
Copy link
Contributor

Nokel81 commented Aug 3, 2023

Search terms

multiple declarations

Expected Behavior

No warning produced

Actual Behavior

[warning] menuShouldBlockScroll has multiple declarations with a comment. An arbitrary comment will be used.
[info] The comments for name are declared at:
  /some-repo/node_modules/react-select/dist/declarations/src/Select.d.ts:155
  /some-repo/node_modules/react-select/dist/declarations/src/Select.d.ts:155

Steps to reproduce the bug

config:

{
  "readme": "../../docs/typedoc-readme.md.tpl",
  "name": "my-package-name",
  "out": "../../docs/api",
  "excludePrivate": true,
  "entryPointStrategy": "expand",
  "excludeExternals": false,
  "entryPoints": [
    "src/api.ts",
  ],
  "disableSources": true,
  "plugin": [
    "typedoc-plugin-markdown"
  ]
}

current-level tsconfig

{
  "extends": "../../tsconfig.json",
  "compilerOptions": {
    "baseUrl": ".",
    "paths": {
      "*": [
        "node_modules/*",
        "types/*"
      ]
    },
    "plugins": [
      {
        "name": "typescript-plugin-css-modules",
        "options": {
          "namedExports": false
        }
      }
    ]
  },
  "include": [
    "src/**/*"
  ]
}

top level tsconfig

"compilerOptions": {
    "baseUrl": ".",
    "jsx": "react",
    "target": "ES2019",
    "module": "ES2022",
    "lib": [
      "ESNext",
      "DOM",
      "DOM.Iterable"
    ],
    "moduleResolution": "Node",
    "sourceMap": true,
    "strict": true,
    "noImplicitAny": true,
    "noUnusedLocals": true,
    "noImplicitReturns": true,
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
    "isolatedModules": true,
    "skipLibCheck": true,
    "allowJs": false,
    "esModuleInterop": true,
    "importsNotUsedAsValues": "error",
    "traceResolution": false,
    "resolveJsonModule": true,
    "useDefineForClassFields": true,
  },
  "ts-node": {
    "transpileOnly": true,
    "compilerOptions": {
      "module": "CommonJS"
    }
  },
  "exclude": [
    "node_modules",
  ]
}

Environment

  • Typedoc version: 0.24.8
  • TypeScript version: 4.9.5
  • Node.js version: 18.15.3
  • OS: macOS
@Nokel81 Nokel81 added the bug Functionality does not match expectation label Aug 3, 2023
@Oblarg
Copy link

Oblarg commented Aug 4, 2023

Currently seeing this behavior, as well.

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Aug 11, 2023

This is a really weird issue, since it indicates that somehow there's a duplicate in symbol.declarations... which as far as I understood the compiler API, should not be the case, or declarationToCommentNode/collectCommentRanges is somehow duplicating a node, which would be a bug in those very simple functions.

The latest version of react-select's source doesn't match up with what that warning says is happening, is there any chance you could create a simple project I could look at to see this warning?

@Gerrit0 Gerrit0 added the needs reproduction Needs a minimal reproducible case label Aug 11, 2023
@Nokel81
Copy link
Contributor Author

Nokel81 commented Aug 11, 2023

FYI I am using "react-select": "^5.7.0", but will try to make a reproduction

@Gerrit0
Copy link
Collaborator

Gerrit0 commented Aug 25, 2023

Can't do anything for this without a reproduction, seems to work properly for me

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Functionality does not match expectation needs reproduction Needs a minimal reproducible case
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants