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

Inconsistent default settings in ralph.json and alephium.config.ts #291

Open
simerplaha opened this issue Sep 13, 2024 · 0 comments
Open

Comments

@simerplaha
Copy link
Member

simerplaha commented Sep 13, 2024

Default Settings

The sourceDir configuration in alephium.config.ts documents that it defaults to <project_root>/contracts. However, in LSP, the issue #273 changed this behaviour to use the project_root as the default source directory to avoid the error "Directory 'contracts' does not exist" for new projects. This behaviour is inconsistent with the documentation and could be confusing. contractPath in ralph.json originally defaulted to contracts which was consistent with the documentation.

This also applies to solution implemented for issue #247, for the artifactPath configuration. The documentation says that alephium.config.ts defaults artifactDir to <project_root>/artifacts. artifactPath in ralph.json also originally defaulted to artifacts which was consistent with this documentation.

Alternative solution to avoid the "'directory' does not exist" errors is to generate the default source directories contracts and artifacts, maybe drop artifactPath for now and revert when #84 is being implemented. This also means that a new project with a single .ral file will not compile unless it's placed in contracts directory.

Naming Convention

There are also naming convention mismatches between ralph.json and alephium.config.ts. For example, alephium.config.ts uses the name sourceDir whereas ralph.json uses the name contractPath. The current naming convention used in ralph.json follows the node class Config.scala.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant