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

[RFC] Resolve Circular Dependency Problem on Wren CLI building #101

Closed
clsource opened this issue May 2, 2021 · 3 comments
Closed

[RFC] Resolve Circular Dependency Problem on Wren CLI building #101

clsource opened this issue May 2, 2021 · 3 comments

Comments

@clsource
Copy link

clsource commented May 2, 2021

In the #80 conversation, it was noted that if in the future we would want to replace python with wren files for building wren_cli, it would be needed to compile a wren_cli before compiling the final version. Hence creating a need for having a wren_cli before having a wren_cli.

One possibility for solving this is using a cached versions of the wren_cli modules. That way a transitional wren_cli can be built only for executing the future wren scripts needed for compilation:

util
├── generate_projects.wren
├── metrics.wren
├── test.wren
└── wren_to_c_string.wren

cached modules can be called inside modules.c with a compiler flag.

// modules.c
#ifdef USE_MODULES_CACHE
  #include "modules_cache.h"
#else
  #include "io.wren.inc"
  #include "os.wren.inc"
  #include "repl.wren.inc"
  #include "scheduler.wren.inc"
  #include "timer.wren.inc"
#endif

A possible value for modules_cache.h

modules_cache.h

@joshgoebel
Copy link
Contributor

From the original thread:

Ruby: It's not solving any particular problem that has impact while working on the cli, and is unnecessary complexity at this time. (not referring the to new line fix).

I think "at this time" can be read optimistically as "it might be nice to have one day, but it doesn't really help us out right now"... and [a bit] sadly I think I agree. I feel like someone would have to show that Python3 is a truly onerous requirement to get any traction on this (in the immediate future).

@joshgoebel
Copy link
Contributor

Worth noting I do play to do this in my own wren-essentials project, replace the scripts with Wren as possible - though it's not a high priority.

@clsource
Copy link
Author

clsource commented May 2, 2021

Ok.
I'm closing this. Maybe in the future it can be reopened when python can be replaced with wren scripts (if wanted)

👍

@clsource clsource closed this as completed May 2, 2021
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