Skip to content

Commit

Permalink
enh: generate mod files on every change
Browse files Browse the repository at this point in the history
  • Loading branch information
Pranavchiku committed Dec 20, 2024
1 parent 6325805 commit 578dd03
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions server/src/lfortran-accessors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,16 @@ export class LFortranCLIAccessor implements LFortranAccessor {
// Execute the command within a shell
const find_output = spawnSync("echo $(find $(pwd) -type d | sed 's/^/-I/')", { shell: true });

// generate .mod files for the module
const module_flags = ["-c", "--continue-compilation"];
const run_module = await this.runCompiler(settings, module_flags, text, "[]");

this.logger.info(
LFortranCLIAccessor.LOG_CONTEXT,
"run_module: %s",
run_module
);

const flags = ["--show-document-symbols", "--continue-compilation", find_output.stdout.toString().trim()];
const stdout = await this.runCompiler(settings, flags, text, "[]");

Expand Down

0 comments on commit 578dd03

Please sign in to comment.