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

Handle non-existing files better #1765

Closed
YaroShkvorets opened this issue Nov 8, 2024 · 0 comments · Fixed by #1766
Closed

Handle non-existing files better #1765

YaroShkvorets opened this issue Nov 8, 2024 · 0 comments · Fixed by #1766
Assignees
Labels
bug Something isn't working

Comments

@YaroShkvorets
Copy link
Collaborator

Which packages are impacted by your issue?

@graphprotocol/graph-cli

Describe the issue

If ABI/SPKG file is not accessible, the codegen just crashes.

image

Should give an error and allow to re-enter.
Maybe even support TAB-based completion?

Reproduction

n/a

Steps to Reproduce the Bug or Issue

  1. graph init
  2. provide ABI from file
  3. enter non-existing file name

Expected behavior

See above

Screenshots or Videos

No response

Platform

  • OS: [e.g. macOS, Windows, Linux]
  • NodeJS: [e.g. 18.5.0]
  • @graphprotocol/* version(s): [e.g. 2.6.2]

Subgraph Manifest

No response

Subgraph GraphQL Schema

No response

Additional context

No response

@YaroShkvorets YaroShkvorets added the bug Something isn't working label Nov 8, 2024
@YaroShkvorets YaroShkvorets changed the title Handle non-existin files better Handle non-existing files better Nov 8, 2024
@YaroShkvorets YaroShkvorets moved this to 🔖 Next in Tooling Nov 8, 2024
0237h added a commit to 0237h/graph-tooling that referenced this issue Nov 11, 2024
- Error message now changes within CLI interactive session instead of
  error crash
- Passing `--abi` will correctly pre-fill the interactive form
- Catch JSON parsing exception for `EthereumABI`.

Closes: graphprotocol#1765
0237h added a commit to 0237h/graph-tooling that referenced this issue Nov 11, 2024
- Error message now shows within CLI interactive session instead of
  error crash
- Passing `--abi` will correctly pre-fill the interactive form
- Catch JSON parsing exception for `EthereumABI`.

Closes: graphprotocol#1765
@0237h 0237h closed this as completed in d2fda94 Nov 12, 2024
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Tooling Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

2 participants