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

trying to compile any commands creates an error and doesnt work #4

Open
yummy-licorice opened this issue Jan 6, 2025 · 2 comments
Open

Comments

@yummy-licorice
Copy link

i tried to compile the example in the readme

import
  kapsis

commands:
  -- "Source-to-Source"
  src string(-s), path(`timl`), bool(--pretty):
    ## Transpile `timl` code to a specific target source
  
  ast path(`timl`), filename(`output`):
    ## Generate binary AST from a `timl` file

but it creates this error when i try to compile it
Screenshot from 2025-01-06 at 10_18_20 014830641

@georgelemon
Copy link
Member

First, generate your package using nimble init as binary app.

In mypackage.nimble add requires "kapsis#head"

A working example should be:

import pkg/kapsis
import pkg/kapsis/cli

proc oneCommand*(v: Values) =
  displayInfo("Hello")

proc twoCommand*(v: Values) =
  displayWarning("yay!")

commands:
  -- "Source-to-Source"
  one string(-s), path(`timl`), bool(--pretty):
    ## A cool description here
  
  two path(`timl`), filename(`output`):
    ## Something smart about this command

Build your program using nimble build instead of nim

@yummy-licorice
Copy link
Author

that gives the exact same error when running the nimble build command. in a different project I tried to use the pkgver nimble package, but that gave the same error when compiling. i dont have a problem when using nimble packages from any other organizations, so thats odd.

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

No branches or pull requests

2 participants