question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Simplify `protostar.toml`

See original GitHub issue

As a StarkNet contract developer, I want protostar.toml be more intuitive, so that I don’t have to check docs every time I want to modify something.

The current structure is the result of introducing “CLI based configuration” later in the project.

  • remove ["protostar.project"] section
    • install, update, remove commands should accept libs_path as an argument
  • rename ["protostar.shared_command_configs"] to something shorter:
    • [protostar.shared], [protostar.general], [protostar.default], [protostar.project](my fav)
    • this section should be auto generated by the protostar init
      • protostar init should include a comment explainig this section
  • remove ["protostar.config"]
    • move protostar_version to [protostar.project] or shared/general whatever
    • rename protostar_version to min_protostar_version
    • initially protostar_version was meant to be named version and indicate version of the protostar.toml
  • remove double quotes from sections e.g. ["protostar.test"] -> [protostar.test]
  • protostar implementing this task should throw an error if the declared protostar_version is lower
  • use kebab case everywhere
  • remove ["protostar.contracts"]?
# In this section you can set any argument from any command. <= comment generated by protostar init
# e.g.
# ...
[protostar.project] # <= protostar.config + protostar.project + protostar.shared_command_configs
min-protostar-version="9.9.9" # <= extra field not available from the CLI
libs-path="..."
no-color=true
cairo-path=["...", "..."]

# Some comment explaining this section generated by `protostar init`
[protostar.contracts] # <= consider redesigning `build command` so that this section can be removed and to allow building specific contracts rather than the whole project 
# ...

# commands configuration...
[protostar.test]
# ...

Issue Analytics

  • State:closed
  • Created a year ago
  • Reactions:2
  • Comments:9 (3 by maintainers)

github_iconTop GitHub Comments

2reactions
mkaputcommented, Jul 15, 2022

protostar. prefix everywhere?

to mimic poetry i think?, we can get rid of it i guess?

Poetry has the prefix because they are operating in pyproject.toml which is tool agnostic. Here we have protostar.toml which is tool specific.

I think we could always use some kind of extra or metadata prefix for third party tooling. @kasperski95 opinions? 😃

1reaction
kasperski95commented, Jul 18, 2022

protostar = “9.9.9” hmm maybe it’s better? this field is created_with_protostar_version but it is too wordy

IMO this property is confusing for users (and for me). Should they update the version everytime they upgrade the Protostar? It should be clear why do we need this property.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Testing | Protostar - Software Mansion
Protostar provides a flexible testing environment for Cairo smart contracts. It allows to write unit/integration tests with a help of cheatcodes.
Read more >
starklings/protostar.toml at main · onlydustxyz/starklings - GitHub
An interactive tutorial to get you up and running with Starknet - starklings/protostar.toml at main · onlydustxyz/starklings.
Read more >
Getting Started w/StarkNet & writing smart contracts Cairo
Let's now compile the smart contract. First we need to specify which contract we want to compile in the protostar.toml file. By default...
Read more >
The Rotation-disk Connection in Young Brown Dwarfs
This work was supported in part by a McGill University Tomlinson Doctoral fellowship to K.M., ... 2014 Protostars and Planets VI ed H....
Read more >
Young Investigator's Review Spring 2014 Issue by ... - Issuu
Tomlinson, J.M., Aron, A., Carmichael, C.L., Reis, H.T., & Holmes, ... The protostar then emits a high-speed flow of particles, ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found