Skip to content

Commit

Permalink
Merge pull request #9440 from garazdawi/lukas/otp/various-fixes
Browse files Browse the repository at this point in the history
Mix format and windows CC fixes
  • Loading branch information
garazdawi authored Feb 18, 2025
2 parents 4b4aa5c + 09dc2db commit b3de0d2
Show file tree
Hide file tree
Showing 11 changed files with 78 additions and 60 deletions.
10 changes: 10 additions & 0 deletions .formatter.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# %CopyrightBegin%
#
# SPDX-FileCopyrightText: Copyright Ericsson AB 2025. All Rights Reserved.
#
# SPDX-License-Identifier: Apache-2.0
#
# %CopyrightEnd%
[
inputs: ["**/*.exs", "**/*.ex"]
]
2 changes: 2 additions & 0 deletions Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -540,8 +540,10 @@ compdb:

format-check:
(cd erts/emulator && ERL_TOP=$(ERL_TOP) $(MAKE) format-check)
mix format --check-formatted
format:
(cd erts/emulator && ERL_TOP=$(ERL_TOP) $(MAKE) format)
mix format

dep depend:
$(make_verbose)
Expand Down
2 changes: 2 additions & 0 deletions erts/etc/win32/cygwin_tools/vc/cc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,8 @@ while test -n "$1" ; do
MD=-MD;
fi
OPTIMIZED_BUILD=true;;
-O0|-Og)
;;
-O*)
# Optimization hardcoded, needs to disable debugging too
OPTIMIZE_FLAGS="-Ox -Zi";
Expand Down
2 changes: 2 additions & 0 deletions erts/etc/win32/msys_tools/vc/cc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ while test -n "$1" ; do
MD=-MD;
fi
OPTIMIZED_BUILD=true;;
-O0|-Og)
;;
-O*)
# Optimization hardcoded, needs to disable debugging too
OPTIMIZE_FLAGS="-Ox -Zi";
Expand Down
2 changes: 1 addition & 1 deletion erts/etc/win32/wsl_tools/vc/cc.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ while test -n "$1" ; do
MD=-MD;
fi
OPTIMIZED_BUILD=true;;
-O0)
-O0|-Og)
;;
-O*)
# Optimization hardcoded
Expand Down
85 changes: 43 additions & 42 deletions lib/compiler/scripts/smoke-mix.exs
Original file line number Diff line number Diff line change
Expand Up @@ -22,50 +22,51 @@ defmodule Smoke.MixProject do
defp deps do
case :os.getenv('SMOKE_DEPS_SET') do
'main' ->
[
{:bear, "~> 0.8.7"},
{:cloudi_core, "~> 1.7"},
{:cloudi_service_monitoring, "~> 1.7"},
{:cloudi_service_tcp, "~> 1.7"},
{:cloudi_service_queue, "~> 1.7"},
{:cloudi_service_udp, "~> 1.7"},
{:cloudi_service_map_reduce, "~> 1.7"},
{:cloudi_service_api_requests, "~> 1.7"},
{:cloudi_service_router, "~> 1.7"},
{:cloudi_service_request_rate, "~> 1.7"},
{:concuerror, "~> 0.20.0"},
{:cowboy, "~> 2.6.1"},
{:ecto, "~> 3.0.6"},
{:ex_doc, "~> 0.19.3"},
{:distillery, "~> 2.0.12"},
{:erlydtl, "~> 0.12.1"},
{:gen_smtp, "~> 0.13.0"},
{:getopt, "~> 1.0.1"},
{:gettext, "~> 0.16.1"},
{:gpb, "~> 4.6"},
{:gproc, "~> 0.8.0"},
{:graphql, "~> 0.15.0", hex: :graphql_erl},
{:hut, "~> 1.3"},
{:hackney, "~> 1.15.0"},
{:ibrowse, "~> 4.4.1"},
{:jose, "~> 1.9.0"},
{:lager, "~> 3.6"},
{:locus, "~> 1.6"},
{:nimble_parsec, "~> 0.5.0"},
{:phoenix, "~> 1.4.0"},
{:riak_pb, "~> 2.3"},
{:scalaris, git: "https://github.com/scalaris-team/scalaris",
compile: build_scalaris()},
{:tdiff, "~> 0.1.2"},
{:webmachine, "~> 1.11"},
{:wings, git: "https://github.com/dgud/wings.git",
compile: build_wings()},
{:zotonic_stdlib, "~> 1.0"},
]
[
{:bear, "~> 0.8.7"},
{:cloudi_core, "~> 1.7"},
{:cloudi_service_monitoring, "~> 1.7"},
{:cloudi_service_tcp, "~> 1.7"},
{:cloudi_service_queue, "~> 1.7"},
{:cloudi_service_udp, "~> 1.7"},
{:cloudi_service_map_reduce, "~> 1.7"},
{:cloudi_service_api_requests, "~> 1.7"},
{:cloudi_service_router, "~> 1.7"},
{:cloudi_service_request_rate, "~> 1.7"},
{:concuerror, "~> 0.20.0"},
{:cowboy, "~> 2.6.1"},
{:ecto, "~> 3.0.6"},
{:ex_doc, "~> 0.19.3"},
{:distillery, "~> 2.0.12"},
{:erlydtl, "~> 0.12.1"},
{:gen_smtp, "~> 0.13.0"},
{:getopt, "~> 1.0.1"},
{:gettext, "~> 0.16.1"},
{:gpb, "~> 4.6"},
{:gproc, "~> 0.8.0"},
{:graphql, "~> 0.15.0", hex: :graphql_erl},
{:hut, "~> 1.3"},
{:hackney, "~> 1.15.0"},
{:ibrowse, "~> 4.4.1"},
{:jose, "~> 1.9.0"},
{:lager, "~> 3.6"},
{:locus, "~> 1.6"},
{:nimble_parsec, "~> 0.5.0"},
{:phoenix, "~> 1.4.0"},
{:riak_pb, "~> 2.3"},
{:scalaris,
git: "https://github.com/scalaris-team/scalaris", compile: build_scalaris()},
{:tdiff, "~> 0.1.2"},
{:webmachine, "~> 1.11"},
{:wings, git: "https://github.com/dgud/wings.git", compile: build_wings()},
{:zotonic_stdlib, "~> 1.0"}
]

'rabbitmq' ->
[{:rabbit_common, "~> 3.7.20"}]
[{:rabbit_common, "~> 3.7.20"}]

_ ->
[]
[]
end
end

Expand Down
2 changes: 1 addition & 1 deletion lib/observer/doc/docs.exs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
"guides/etop_ug.md",
"guides/crashdump_ug.md",
"references/cdv_cmd.md",
"observer_app.md",
"observer_app.md"
]
]
6 changes: 3 additions & 3 deletions lib/ssh/doc/docs.exs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
annotations_for_docs: fn
md ->
if md[:rfc] do
[md[:rfc]]
else
[]
[md[:rfc]]
else
[]
end
end,
## The order of these items determine
Expand Down
2 changes: 1 addition & 1 deletion lib/stdlib/doc/docs.exs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
:dets,
:qlc
],
ALGORITHMS: [:rand, :random, :zip, :erl_tar],
ALGORITHMS: [:rand, :random, :zip, :erl_tar, :zstd],
"DATE & TIME": [:calendar, :timer],
NODES: [:slave, :peer, :argparse, :escript, :win32reg]
]
Expand Down
22 changes: 11 additions & 11 deletions make/ex_doc.exs
Original file line number Diff line number Diff line change
Expand Up @@ -106,16 +106,16 @@ groups_for_docs =
end}
end
) ++
[Callbacks: &(&1[:kind] == :callback)] ++
Enum.map(
Access.get(titles, :function, []),
fn {:function, title} ->
{"#{title}",
fn a ->
a[:kind] == :function && String.equivalent?(Access.get(a, :title, ""), title)
end}
end
)
[Callbacks: &(&1[:kind] == :callback)] ++
Enum.map(
Access.get(titles, :function, []),
fn {:function, title} ->
{"#{title}",
fn a ->
a[:kind] == :function && String.equivalent?(Access.get(a, :title, ""), title)
end}
end
)

## Create the correct source url to github
base_url = "https://github.com/" <> System.get_env("BASE_URL", "erlang/otp/blob/master/")
Expand Down Expand Up @@ -161,7 +161,7 @@ current_datetime = System.os_time() |> DateTime.from_unix!(:native)
config = [
proglang: :erlang,
source_url_pattern: source_url_pattern,
assets: %{ Path.join(cwd, "/assets") => "assets" },
assets: %{Path.join(cwd, "/assets") => "assets"},
logo: Path.join(:code.root_dir(), "system/doc/assets/erlang-logo.png"),
before_closing_head_tag: fn _ -> "<style>.dark img { background-color: white; }</style>" end,
before_closing_footer_tag: fn _ ->
Expand Down
3 changes: 2 additions & 1 deletion scripts/otp_check_html_links.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
#!/usr/bin/env elixir

Mix.install([
{:floki, git: "https://github.com/garazdawi/floki.git", ref: "70e934ae5ae7b60c8cdfc091364ad13d9ba2b9f7"}
{:floki,
git: "https://github.com/garazdawi/floki.git", ref: "70e934ae5ae7b60c8cdfc091364ad13d9ba2b9f7"}
])

defmodule Anchors do
Expand Down

0 comments on commit b3de0d2

Please sign in to comment.