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

[Enhancement] Add compilation/running of multiple files #4

Open
YasserDbeis opened this issue Jun 9, 2022 · 1 comment
Open

[Enhancement] Add compilation/running of multiple files #4

YasserDbeis opened this issue Jun 9, 2022 · 1 comment

Comments

@YasserDbeis
Copy link
Contributor

Future feature to be implemented: running code with multiple files.

This seems fairly straight forward with compiled languages. For example, for c/cpp we can send the code as an array of strings, have the file for each code string created, and the g++ command should take care of the rest in creating the executable. Some minor accomodations may need to be made to differentiate b/w header and non-header files, but that is not a big deal.

For interpreted languages, like python, I am not sure its as straight forward with the current mechanism. This is because if a python file imports from a file called "x", the imported filename will be modified to a UUID with the current set-up and thus the import statement will be broken. However, I might be misunderstanding and welcome criticism/solutions.

@sidwebworks
Copy link

@YasserDbeis I think you guys would need some sort of "module resolver" mechanism to create a dependency graph of the files before sending it to the server.

Later the server can flatten that data structure to resolve and load any missing modules.

But because there is no concept of a filesystem right now (I guess?) its more like a single evaluation call.

In a ideal architecture, the client could establish a WS connection with the server which can then be multiplexed to send different types of data like when the first time a enviornment loads, the client can send a Tree of files to the server which it can use to resolve file content.

This will also allow the server to pipe the STD inputs and outputs with using the WS with the client which can then be used to show a terminal view using something like https://xtermjs.org/

Haha these are just my suggestions from some experience with building such tooling, feel free to use if anything is useful to u. 😄

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