The commit listed below (Merge #1172) has possibly broken climaformat.jl as shown in the error trace posted below the commit:
commit 7f9d08dc66c1c0068c57b4f7778b7f68000bab3f (origin/master, origin/HEAD, master)
Merge: 03850273a 6e1b7786b
Author: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
Date: Thu Jun 4 13:51:03 2020 +0000
Merge #1172
Steps to reproduce the behavior:
git log -1. In the case of bugs from code that has significantly diverged from master, a separate branch can be created and linked.commit bfbf19eff9aaf57b84cc16556d65953fb4437aa3 (HEAD -> sm/mountain-waves, origin/sm/mountain-waves)
Author: Simone Marras <[email protected]>
Date: Wed May 27 03:36:43 2020 -0700
Mountain gravity waves:
- hydrostatic linear and non-linear setups
- removed agnesi-equilibrium.jl. IT will be added with its own PR.
- Smagorinsky run with 0.23
- Formatted
- Reduced time end to avoid wave issue after the flow went through a few times
- Replaced ClimateMachine.init() with ClimateMachine.cli() after merging with 7f9d08dc66c1c0068c57b4f7778b7f68000bab3f
This is PR #1163
A clear and concise description of what you expected to happen.
If applicable, add screenshots to help explain your problem, otherwise please remove this section. This can be particularly useful for physical simulations.
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] #format_text#86(::Int64, ::Int64, ::Bool, ::Bool, ::Bool, ::Bool, ::DefaultStyle, ::typeof(format_text), ::String) at /home/smarras/.julia/packages/JuliaFormatter/5Boao/src/JuliaFormatter.jl:291
[3] #format_text at ./none:0 [inlined]
[4] #format_file#87(::Bool, ::Bool, ::Int64, ::Int64, ::Bool, ::Bool, ::Bool, ::Bool, ::DefaultStyle, ::typeof(format_file), ::String) at /home/smarras/.julia/packages/JuliaFormatter/5Boao/src/JuliaFormatter.jl:380
[5] #format_file at ./none:0 [inlined]
[6] #format#88(::Base.Iterators.Pairs{Symbol,Integer,NTuple{6,Symbol},NamedTuple{(:indent, :margin, :always_for_in, :whitespace_typedefs, :whitespace_ops_in_indices, :remove_extra_newlines),Tuple{Int64,Int64,Bool,Bool,Bool,Bool}}}, ::typeof(format), ::Array{String,1}) at /home/smarras/.julia/packages/JuliaFormatter/5Boao/src/JuliaFormatter.jl:453
[7] (::JuliaFormatter.var"#kw##format")(::NamedTuple{(:indent, :margin, :always_for_in, :whitespace_typedefs, :whitespace_ops_in_indices, :remove_extra_newlines),Tuple{Int64,Int64,Bool,Bool,Bool,Bool}}, ::typeof(format), ::Array{String,1}) at ./none:0
[8] top-level scope at /home/smarras/software/CLIMA/.dev/climaformat.jl:86
[9] include at ./boot.jl:328 [inlined]
[10] include_relative(::Module, ::String) at ./loading.jl:1105
[11] include(::Module, ::String) at ./Base.jl:31
[12] exec_options(::Base.JLOptions) at ./client.jl:287
[13] _start() at ./client.jl:460
in expression starting at /home/smarras/software/CLIMA/.dev/climaformat.jl:86
julia> versioninfo()Julia Version 1.3.1
Commit 2d5741174c (2019-12-30 21:36 UTC)
Platform Info:
OS: Linux (x86_64-linux-gnu)
CPU: Intel(R) Xeon(R) Gold 6230 CPU @ 2.10GHz
WORD_SIZE: 64
LIBM: libopenlibm
LLVM: libLLVM-6.0.1 (ORCJIT, skylake)
Environment:
JULIA_MPI_PATH = /home/user/mylibs/mpich-3.3.1/build_intel
Add any other context about the problem here.
Problem is with the file not the formatter
ClimateMachine.cli ()
should have no space
ClimateMachine.cli()
Shouldn't the formatter identify these issues and fix them?
issues solved.
Shouldn't the formatter identify these issues and fix them?
The formatter only works on syntactically correct julia code. It cannot fix bugs
fair enough, but a space after before a parenthesis is not a bug in the real sense. It is a syntax error due to a wrong format of the text in the file. Anyway, that solved it.
A space before a parenthesis is a bug in julia. Since the code won't run.
julia> f() = nothing
f (generic function with 1 method)
julia> f ()
ERROR: syntax: space before "(" not allowed in "f (" at REPL[2]:1
Stacktrace:
[1] top-level scope at REPL[1]:0
Most helpful comment
A space before a parenthesis is a bug in julia. Since the code won't run.