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

relative-dir requires careful evaluation #3

Open
calebzulawski opened this issue Jan 12, 2023 · 1 comment
Open

relative-dir requires careful evaluation #3

calebzulawski opened this issue Jan 12, 2023 · 1 comment

Comments

@calebzulawski
Copy link
Collaborator

This function works:

fn ~(Path:or-source :source) :args -> {
    Path :relative-dir = Path:parent $source
    c++:module ^{relative-dir} { ... }
}

however this function doesn't:

fn ~(Path:or-source :source) :args -> {
    relative-dir = Path:parent $source
    c++:module ^{relative-dir} { ... }
}

I haven't quite tracked down what "doesn't work" means--there is no ergo error, but the module paths are somehow evaluated differently (and result in compiler errors, specifically missing #includes). Also, I guess this is maybe a bug in ergo and not ergo-cpp...

@afranchuk
Copy link
Collaborator

I think I've seen some weird behavior there too. I'm not exactly sure the cause yet.

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