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

Eagerly Compile Imported Code #101

Open
jonnyboyC opened this issue Apr 10, 2022 · 0 comments
Open

Eagerly Compile Imported Code #101

jonnyboyC opened this issue Apr 10, 2022 · 0 comments
Labels
enhancement New feature or request refactor Work around internal structural changes.

Comments

@jonnyboyC
Copy link
Collaborator

As of today Laythe compiles code just before it attempts to run it. In most cases this will occur nearly immediately but as an example say we have these two modules

main.lay

10000.times().iter().each(() => {
  // slow operation
});

import self.lib:{foo}

lib.lay

let bar = 10;

export let foo = bard + 1; // compile error unknown symbol

In laythe today we would indicate the compiler error once we hit the import after the slow operation. Ideally we want to warn of these issues as quickly as possible.

@jonnyboyC jonnyboyC added enhancement New feature or request refactor Work around internal structural changes. labels Apr 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request refactor Work around internal structural changes.
Projects
None yet
Development

No branches or pull requests

1 participant