ci: fix compilation (#8511)
							parent
							
								
									d57a9c419d
								
							
						
					
					
						commit
						5aaeac79fa
					
				| 
						 | 
					@ -37,7 +37,7 @@ mut:
 | 
				
			||||||
	// parser context in the worker processes:
 | 
						// parser context in the worker processes:
 | 
				
			||||||
	table      table.Table
 | 
						table      table.Table
 | 
				
			||||||
	scope      ast.Scope
 | 
						scope      ast.Scope
 | 
				
			||||||
	pref       pref.Preferences
 | 
						pref       &pref.Preferences
 | 
				
			||||||
	period_ms  int  // print periodic progress
 | 
						period_ms  int  // print periodic progress
 | 
				
			||||||
	stop_print bool // stop printing the periodic progress
 | 
						stop_print bool // stop printing the periodic progress
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -96,7 +96,9 @@ fn main() {
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
fn process_cli_args() &Context {
 | 
					fn process_cli_args() &Context {
 | 
				
			||||||
	mut context := &Context{}
 | 
						mut context := &Context{
 | 
				
			||||||
 | 
							pref: 0
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
	context.myself = os.executable()
 | 
						context.myself = os.executable()
 | 
				
			||||||
	mut fp := flag.new_flag_parser(os.args_after('test-parser'))
 | 
						mut fp := flag.new_flag_parser(os.args_after('test-parser'))
 | 
				
			||||||
	fp.application(os.file_name(context.myself))
 | 
						fp.application(os.file_name(context.myself))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -113,6 +113,7 @@ pub fn new(input_path string) Doc {
 | 
				
			||||||
		time_generated: time.now()
 | 
							time_generated: time.now()
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	d.fmt = fmt.Fmt{
 | 
						d.fmt = fmt.Fmt{
 | 
				
			||||||
 | 
							pref: 0
 | 
				
			||||||
		indent: 0
 | 
							indent: 0
 | 
				
			||||||
		is_debug: false
 | 
							is_debug: false
 | 
				
			||||||
		table: d.table
 | 
							table: d.table
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -13,6 +13,9 @@ const (
 | 
				
			||||||
	error_missing_vexe = 1
 | 
						error_missing_vexe = 1
 | 
				
			||||||
	error_failed_tests = 2
 | 
						error_failed_tests = 2
 | 
				
			||||||
	b2v_keep_path      = os.join_path('vlib', 'v', 'fmt', 'tests', 'bin2v_keep.vv')
 | 
						b2v_keep_path      = os.join_path('vlib', 'v', 'fmt', 'tests', 'bin2v_keep.vv')
 | 
				
			||||||
 | 
						fpref              = &pref.Preferences{
 | 
				
			||||||
 | 
							is_fmt: true
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
fn test_fmt() {
 | 
					fn test_fmt() {
 | 
				
			||||||
| 
						 | 
					@ -49,13 +52,10 @@ fn test_fmt() {
 | 
				
			||||||
			continue
 | 
								continue
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		table := table.new_table()
 | 
							table := table.new_table()
 | 
				
			||||||
		file_ast := parser.parse_file(ipath, table, .parse_comments, &pref.Preferences{
 | 
							file_ast := parser.parse_file(ipath, table, .parse_comments, fpref, &ast.Scope{
 | 
				
			||||||
			is_fmt: true
 | 
					 | 
				
			||||||
			ccompiler: 'gcc'
 | 
					 | 
				
			||||||
		}, &ast.Scope{
 | 
					 | 
				
			||||||
			parent: 0
 | 
								parent: 0
 | 
				
			||||||
		})
 | 
							})
 | 
				
			||||||
		result_ocontent := fmt.fmt(file_ast, table, false)
 | 
							result_ocontent := fmt.fmt(file_ast, table, fpref, false)
 | 
				
			||||||
		if expected_ocontent != result_ocontent {
 | 
							if expected_ocontent != result_ocontent {
 | 
				
			||||||
			fmt_bench.fail()
 | 
								fmt_bench.fail()
 | 
				
			||||||
			eprintln(fmt_bench.step_message_fail('file $vrelpath after formatting, does not look as expected.'))
 | 
								eprintln(fmt_bench.step_message_fail('file $vrelpath after formatting, does not look as expected.'))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -11,6 +11,9 @@ import v.util
 | 
				
			||||||
const (
 | 
					const (
 | 
				
			||||||
	error_missing_vexe = 1
 | 
						error_missing_vexe = 1
 | 
				
			||||||
	error_failed_tests = 2
 | 
						error_failed_tests = 2
 | 
				
			||||||
 | 
						fpref              = &pref.Preferences{
 | 
				
			||||||
 | 
							is_fmt: true
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
fn test_fmt() {
 | 
					fn test_fmt() {
 | 
				
			||||||
| 
						 | 
					@ -44,12 +47,10 @@ fn test_fmt() {
 | 
				
			||||||
			continue
 | 
								continue
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		table := table.new_table()
 | 
							table := table.new_table()
 | 
				
			||||||
		file_ast := parser.parse_file(ipath, table, .parse_comments, &pref.Preferences{
 | 
							file_ast := parser.parse_file(ipath, table, .parse_comments, fpref, &ast.Scope{
 | 
				
			||||||
			is_fmt: true
 | 
					 | 
				
			||||||
		}, &ast.Scope{
 | 
					 | 
				
			||||||
			parent: 0
 | 
								parent: 0
 | 
				
			||||||
		})
 | 
							})
 | 
				
			||||||
		result_ocontent := fmt.fmt(file_ast, table, false)
 | 
							result_ocontent := fmt.fmt(file_ast, table, fpref, false)
 | 
				
			||||||
		if expected_ocontent != result_ocontent {
 | 
							if expected_ocontent != result_ocontent {
 | 
				
			||||||
			fmt_bench.fail()
 | 
								fmt_bench.fail()
 | 
				
			||||||
			eprintln(fmt_bench.step_message_fail('file $ipath after formatting, does not look as expected.'))
 | 
								eprintln(fmt_bench.step_message_fail('file $ipath after formatting, does not look as expected.'))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -11,6 +11,9 @@ import v.util
 | 
				
			||||||
const (
 | 
					const (
 | 
				
			||||||
	error_missing_vexe = 1
 | 
						error_missing_vexe = 1
 | 
				
			||||||
	error_failed_tests = 2
 | 
						error_failed_tests = 2
 | 
				
			||||||
 | 
						fpref              = &pref.Preferences{
 | 
				
			||||||
 | 
							is_fmt: true
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
)
 | 
					)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
fn test_vlib_fmt() {
 | 
					fn test_vlib_fmt() {
 | 
				
			||||||
| 
						 | 
					@ -42,12 +45,10 @@ fn test_vlib_fmt() {
 | 
				
			||||||
			continue
 | 
								continue
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		table := table.new_table()
 | 
							table := table.new_table()
 | 
				
			||||||
		file_ast := parser.parse_file(ipath, table, .parse_comments, &pref.Preferences{
 | 
							file_ast := parser.parse_file(ipath, table, .parse_comments, fpref, &ast.Scope{
 | 
				
			||||||
			is_fmt: true
 | 
					 | 
				
			||||||
		}, &ast.Scope{
 | 
					 | 
				
			||||||
			parent: 0
 | 
								parent: 0
 | 
				
			||||||
		})
 | 
							})
 | 
				
			||||||
		result_ocontent := fmt.fmt(file_ast, table, false)
 | 
							result_ocontent := fmt.fmt(file_ast, table, fpref, false)
 | 
				
			||||||
		if expected_ocontent != result_ocontent {
 | 
							if expected_ocontent != result_ocontent {
 | 
				
			||||||
			fmt_bench.fail()
 | 
								fmt_bench.fail()
 | 
				
			||||||
			eprintln(fmt_bench.step_message_fail('file $ipath after formatting, does not look as expected.'))
 | 
								eprintln(fmt_bench.step_message_fail('file $ipath after formatting, does not look as expected.'))
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue