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

aiken docs stops working for conditional modules (toml config) #1044

Closed
stanislav-az opened this issue Oct 21, 2024 · 2 comments
Closed

aiken docs stops working for conditional modules (toml config) #1044

stanislav-az opened this issue Oct 21, 2024 · 2 comments

Comments

@stanislav-az
Copy link

What Git revision are you using?

Version: v1.1.4+79d0e45

Also checked with v1.1.5.

What operating system are you using, and which version?

Operating System: Ubuntu 22.04.5 LTS
Architecture: x86_64

Describe what the problem is?

I have added a small conditional configuration like this:

[config.default]
is_mainnet = true

[config.testnet]
is_mainnet = false

And used it inside one of the modules in lib by importing use config and calling config.is_mainnet.

That change breaks aiken docs command:

 % aiken docs
   Generating documentation for myproject 0.0.0 (.)
    Compiling aiken-lang/stdlib v2.1.0 (./build/packages/aiken-lang-stdlib)
      Writing documentation files to ./docs

   aiken::fatal::error
   Whoops! You found a bug in the Aiken compiler.
   
   Please report this error at https://github.com/aiken-lang/aiken/issues/new.
   In your bug report please provide the information below and if possible the code
   that produced it.
   
   Operating System: linux
   Architecture:     x86_64
   Version:          v1.1.4+79d0e45
   
   crates/aiken-project/src/docs/source_links.rs:64:72
   
       called `Option::unwrap()` on a `None` value

What should be the expected behavior?

aiken docs should create documentation successfully.

@KtorZ
Copy link
Member

KtorZ commented Oct 21, 2024

Ho.

@stanislav-az
Copy link
Author

Update: when I added another parameter in my configuration aiken docs started working again :)

[config.default]
is_mainnet = true
my_token_name = "MT"

[config.testnet]
is_mainnet = false
my_token_name = "MyToken"

@KtorZ KtorZ closed this as completed in 2b7ca0e Oct 25, 2024
@github-project-automation github-project-automation bot moved this from 🪣 Backlog to ✅ In Next Release in Project Tracking Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: ✅ In Next Release
Development

No branches or pull requests

2 participants