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

Deprecation warning for servicePath can't be resolved in TypeScript. #2035

Open
dhenneke opened this issue Apr 15, 2024 · 1 comment
Open
Assignees
Labels
api: firestore Issues related to the googleapis/nodejs-firestore API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.

Comments

@dhenneke
Copy link

Environment details

  • OS: Mac OS 14.4.1 (23E224)
  • Node.js version: v18.19.1
  • npm version: 10.2.4
  • @google-cloud/firestore version: 7.6.0

Steps to reproduce

  1. Call v1.FirestoreClient.apiEndpoint
  2. The console logs DeprecationWarning: Static servicePath is deprecated, please use the instance method instead.

This commit added the deprecation warning and also the new field to use: d964a13. However, it is not possible to call the apiEndpoint instance method because the TypeScript interface was not updated with the new function:

/**
* The DNS address for this API service - same as servicePath(),
* exists for compatibility reasons.
* @returns {string} The DNS address for this service.
*/
static get apiEndpoint(): string;

It misses both the @deprecated documentation and the new getter.

@dhenneke dhenneke added priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns. labels Apr 15, 2024
@product-auto-label product-auto-label bot added the api: firestore Issues related to the googleapis/nodejs-firestore API. label Apr 15, 2024
@dconeybe dconeybe self-assigned this Apr 16, 2024
@dconeybe
Copy link
Contributor

dconeybe commented Apr 18, 2024

Hmm, it looks like the .d.ts files in the types subdirectory (other than firestore.d.ts) are supposed to be updated automatically by the owlbot build system; however, this appears to be broken.

Here is a timeline:

  1. March 2021: #1433 adds the .d.ts files, such as types/v1/firestore_client.d.ts, and configures "autosynth" to automatically update them.
  2. July 2021: PR #1564 is the last autosynth PR that updates these .d.ts files.
  3. August 2021: PR #1587 migrates from "autosynth" to "owlbot"

The .d.ts files are never updated again by any automated tools.

So it looks like something went wrong in the migration from autosynth to owlbot. I'll look into it.

(Googlers see team discussion here: https://chat.google.com/room/AAAA_3vtwIc/5IKdgmjGl8E)

@dconeybe dconeybe assigned MarkDuckworth and ehsannas and unassigned dconeybe Apr 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
api: firestore Issues related to the googleapis/nodejs-firestore API. priority: p2 Moderately-important priority. Fix may not be included in next release. type: bug Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Projects
None yet
Development

No branches or pull requests

4 participants