You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Default Settings
The
sourceDir
configuration inalephium.config.ts
documents that it defaults to<project_root>/contracts
. However, in LSP, the issue #273 changed this behaviour to use theproject_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
inralph.json
originally defaulted tocontracts
which was consistent with the documentation.This also applies to solution implemented for issue #247, for the
artifactPath
configuration. The documentation says thatalephium.config.ts
defaultsartifactDir
to<project_root>/artifacts
.artifactPath
inralph.json
also originally defaulted toartifacts
which was consistent with this documentation.Alternative solution to avoid the "'directory' does not exist" errors is to generate the default source directories
contracts
andartifacts
, maybe dropartifactPath
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 incontracts
directory.Naming Convention
There are also naming convention mismatches between
ralph.json
andalephium.config.ts
. For example,alephium.config.ts
uses the namesourceDir
whereasralph.json
uses the namecontractPath
. The current naming convention used inralph.json
follows the node classConfig.scala
.The text was updated successfully, but these errors were encountered: