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

@edgedb/generate scripts not executing properly with bun version 1.1.10 #1032

Open
mcisne4 opened this issue May 29, 2024 · 0 comments
Open

Comments

@mcisne4
Copy link

mcisne4 commented May 29, 2024

When using the latest version of bun (v1.1.10), the bunx @edgedb/generate queries and the bunx @edgedb/generate interfaces scripts do not fully execute. Execution of the scripts starts properly but suddenly terminates after attempting to connect to the database. No errors are emitted, execution just stops. No files are generated as a result.

The above issue is resolved if I roll back to the previous version of bun (v1.1.9).

NOTE: The bunx @edgedb/generate edgeql-js script seems to execute properly. The TypeScript/JS code inside of my app is able to properly connect and communicate with the database.

Error or desired behavior

Executing the queries generation script:

# [Bun v1.1.10]
# Improper Execution:
> bunx @edgedb/generate queries
Generating functions from .edgeql files...
Detected tsconfig.json, generating TypeScript files.
   To override this, use the --target flag.
   Run `npx @edgedb/generate --help` for full options.
Detected project root via edgedb.toml:
   /home/mcisne4/dev/bun/experiment-26
Detected schema directory: dbschema
Connecting to database...
# [Bun v1.1.9]
# Proper Execution:
> bunx @edgedb/generate queries
Generating functions from .edgeql files...
Detected tsconfig.json, generating TypeScript files.
   To override this, use the --target flag.
   Run `npx @edgedb/generate --help` for full options.
Detected project root via edgedb.toml:
   /home/mcisne4/dev/bun/experiment-26
Detected schema directory: dbschema
Connecting to database...
Analyzing .edgeql files...
Generating files for following queries:
   ./queries/insertXYZ.query.ts

Executing the interfaces script:

# [Bun v1.1.10]
# Improper Execution:
> bunx @edgedb/generate interfaces
Generating TS interfaces from schema...
Introspecting database schema...
# [Bun v1.1.9]
# Proper Execution:
> bunx @edgedb/generate interfaces
Generating TS interfaces from schema...
Introspecting database schema...
Generating interfaces...
Writing interfaces file...
   ./dbschema/interfaces.ts
Generation complete! 🤘

Versions:

  • OS: Ubuntu 23.10
  • EdgeDB version: 5.4+867a505
  • EdgeDB CLI version: 5.1.0+7c5764f
  • edgedb-js version : 1.5.7
  • @edgedb/generate version: 0.5.3
  • TypeScript version: 5.4.5
  • Bun version: 1.1.10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant