Skip to content

Commit

Permalink
fix v run . (restore .json generation next to the input .go files)
Browse files Browse the repository at this point in the history
  • Loading branch information
spytheman committed Aug 19, 2024
1 parent 68518bd commit c2c57e1
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions main.v
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,7 @@ fn type_or_ident(typ TypeOrIdent) string {
}

fn generate_ast_for_go_file(go_file_path string) string {
tmpdir := os.temp_dir()
output_file := tmpdir + '/go.json'
output_file := go_file_path + '.json'

asty_cmd := '${full_path_to_asty} go2json -indent 2 -input ${go_file_path} -output ${output_file}'
println('generating ast for ${go_file_path}, using: `${asty_cmd}`...')
Expand Down Expand Up @@ -122,9 +121,7 @@ fn (mut app App) run_test(subdir string, test_name string) ! {
eprintln('Failed to parse Go AST 2: ${err}')
return
}

tmpdir := os.temp_dir()

generated_v_code := app.generate_v_code(go_file)

v_path := '${tmpdir}/${test_name}.v'
Expand Down

0 comments on commit c2c57e1

Please sign in to comment.