Skip to content

cli: allow manifest download without config file#38

Merged
luc10921 merged 4 commits into
masterfrom
manifest-download
Feb 3, 2026
Merged

cli: allow manifest download without config file#38
luc10921 merged 4 commits into
masterfrom
manifest-download

Conversation

@ixje

@ixje ixje commented Feb 2, 2026

Copy link
Copy Markdown
Member

Depends on #36 and #37 (review/merge those first)

It is currently not possible to download a contract manifest without having a cpm.yml file present. This should not be a requirement for a command as follows

./cpm --log-level DEBUG download manifest -c 0x3491b358a9ddce38cb567e2bb8bd1bf783cd556d -N https://mainnet1.neo.coz.io:443

All I wanted was to download the manifest so I could generate bindings. No storage needed.

@ixje
ixje requested a review from luc10921 February 2, 2026 12:24
@luc10921

luc10921 commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

When trying to download it without using the -N flag, I get the following error:
FATA[0000] Config file cpm.yaml not found. Run 'cpm init' to create a default config.
I think it would be nice to also explain the user could use -N instead of creating a config file

@ixje

ixje commented Feb 2, 2026

Copy link
Copy Markdown
Member Author

When trying to download it without using the -N flag, I get the following error: FATA[0000] Config file cpm.yaml not found. Run 'cpm init' to create a default config. I think it would be nice to also explain the user could use -N instead of creating a config file

What command did you use? -n?
Both -n and -s explicitly state they access cpm.yaml in their command usage descriptions.

@luc10921

luc10921 commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

./cpm --log-level DEBUG download manifest -c 0x3491b358a9ddce38cb567e2bb8bd1bf783cd556d
I used no network flag, I was thinking that the user might expect it to download from mainnet by default and if they got the error, it would seem like they couldn't use just the terminal without the config file to download it.

Also, do you think we should allow this behaviour with cpm download contract? Or, since it's tied to neoxp files, it would be better to encourage the user to have a cpm.yaml file?

@ixje

ixje commented Feb 2, 2026

Copy link
Copy Markdown
Member Author

./cpm --log-level DEBUG download manifest -c 0x3491b358a9ddce38cb567e2bb8bd1bf783cd556d I used no network flag

I think in that case it should not work at all. Either -n or -N should be mandatory

Also, do you think we should allow this behaviour with cpm download contract? Or, since it's tied to neoxp files, it would be better to encourage the user to have a cpm.yaml file?

The download contract is really tight to having a local network where it can download to. Making everything an argument is possible, but was not the original intention.

@luc10921

luc10921 commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

I think in that case it should not work at all. Either -n or -N should be mandatory

Ok, but if they run ./cpm download manifest -c 0x3491b358a9ddce38cb567e2bb8bd1bf783cd556d should the error message be FATA[0000] Config file cpm.yaml not found. Run 'cpm init' to create a default config. with no mentions of the -N flag?

@ixje

ixje commented Feb 2, 2026

Copy link
Copy Markdown
Member Author

I think in that case it should not work at all. Either -n or -N should be mandatory

Ok, but if they run ./cpm download manifest -c 0x3491b358a9ddce38cb567e2bb8bd1bf783cd556d should the error message be FATA[0000] Config file cpm.yaml not found. Run 'cpm init' to create a default config. with no mentions of the -N flag?

no, I think we need a new message and/or logic that says -n or -N (one of the two) is mandatory. I'll make that part of this PR

@luc10921
luc10921 merged commit d3a89dd into master Feb 3, 2026
1 check passed
@ixje
ixje deleted the manifest-download branch February 3, 2026 13:41
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

Successfully merging this pull request may close these issues.

2 participants