Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove most packages #1011

Merged
merged 18 commits into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
72 changes: 66 additions & 6 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ jobs:
- core-apps
- core-autopatch
- core-compat
- core-deps
# Trick GH runners into picking this slower job early.
- ACME=1 c=core-deps
- core-makedep
- core-misc
- core-plugins
Expand All @@ -41,20 +42,24 @@ jobs:
- cover
- c-src
- ct
- dialyzer
- dialyzer SET=1
- dialyzer SET=2
- dialyzer SET=3
- dialyzer SET=4
- edoc
- erlydtl
- escript
- eunit
- hex
- proper
- protobuffs
- relx
# Trick GH runners into picking this slower job early.
- ACME=1 c=relx
- shell
- sphinx
- triq
- xref
extra: ['', 'LEGACY=1']
extra: ['', 'CACHE_DEPS=1', 'LEGACY=1']
exclude:
# We disable proper/triq tests until ubuntu-latest includes GNU Make 4.4 or later.
- os: ubuntu-latest
Expand Down Expand Up @@ -93,12 +98,12 @@ jobs:

- name: Run tests (Linux)
if: matrix.os == 'ubuntu-latest'
run: make check c=${{ matrix.suite }} -k ${{ matrix.extra }}
run: make check c=${{ matrix.suite }} -j4 -k ${{ matrix.extra }}

- name: Run tests (Windows)
if: matrix.os == 'windows-latest'
shell: msys2 {0}
run: PATH=$INSTALL_DIR_FOR_OTP/bin:$PATH make check c=${{ matrix.suite }} -k V=3 ${{ matrix.extra }}
run: PATH=$INSTALL_DIR_FOR_OTP/bin:$PATH make check c=${{ matrix.suite }} -j4 -k ${{ matrix.extra }}

- name: Upload artifacts
if: failure()
Expand All @@ -107,3 +112,58 @@ jobs:
name: ${{ matrix.os }} OTP-${{ matrix.erlang }} ${{ matrix.suite }} ${{ matrix.extra }}
path: |
test/test_*/

packages:
strategy:
fail-fast: false
matrix:
erlang:
- '27'
os:
# - macos-latest
- ubuntu-latest
# - windows-latest
extra: ['', 'LEGACY=1']
runs-on: ${{ matrix.os }}

steps:

- name: Checkout repository
uses: actions/checkout@v4

- name: Install Erlang/OTP
uses: erlef/setup-beam@v1
with:
otp-version: ${{ matrix.erlang }}
version-type: loose

- name: Setup MSYS2 (Windows)
if: matrix.os == 'windows-latest'
uses: msys2/setup-msys2@v2
with:
msystem: mingw64
release: false
update: true
install: >-
git
make
mingw-w64-x86_64-gcc
gnu-netcat
diffutils

- name: Run tests (Linux)
if: matrix.os == 'ubuntu-latest'
run: make packages -k ${{ matrix.extra }}

- name: Run tests (Windows)
if: matrix.os == 'windows-latest'
shell: msys2 {0}
run: PATH=$INSTALL_DIR_FOR_OTP/bin:$PATH make packages -j4 -k ${{ matrix.extra }}

- name: Upload artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }} OTP-${{ matrix.erlang }} packages ${{ matrix.extra }}
path: |
test/packages/
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@ doc/guide.pdf
doc/html
test/logs/
test/packages/
test/test_hex_core_git/
test/test_rebar_git/
50 changes: 20 additions & 30 deletions CHANGELOG.asciidoc
Original file line number Diff line number Diff line change
@@ -1,33 +1,3 @@
2022/03/25: The -Wrace_conditions Dialyzer flag was removed
as it is no longer available starting from OTP 25.

2022/05/20: Relx has been updated to v4. Relx v4 is no longer
an escript, therefore breaking changes were
introduced. The `RELX`, `RELX_URL` and `RELX_OPTS`
variables were removed. The `relx` project must
be added as a `DEPS`, `BUILD_DEPS` or `REL_DEPS`
dependency to enable building releases. For example:
`REL_DEPS = relx`. Relx itself has had some
additional changes: the `start` command has
been replaced by `daemon`, and configuration
defaults have changed so that you may need
to add the following to your relx.config file:

``` erlang
{dev_mode, false}.
{include_erts, true}.
```

2022/05/31: Xref support has been rewritten. Erlang.mk no
longer uses the xref_runner, instead implementing
its own interface. This new interface is more
flexible and more powerful: it supports both
checks and informational analyses as well as
the Xref query functions that use the powerful
Xref language to perform custom queries. Erlang.mk
can also run analyses and queries against all
dependencies as well as Erlang/OTP applications.

2023/05/12: Rebar3 is now used for autopatch instead of
Rebar2. `make distclean` or `rm -rf .erlang.mk`
might be required after updating Erlang.mk.
Expand All @@ -53,3 +23,23 @@
2024/10/01: Initial beam-cache implementation. This is used
to cache beam files when switching from/to test
builds.

2024/11/14: Most packages in the Erlang.mk package index
have been removed. To ensure that existing
projects continue working, please add the
relevant dep_* lines to your projects. If
you were using dep_*_commit lines make sure
to update them as well. Note that projects
that have corresponding Erlang.mk functionality,
as well as Cowboy, Ranch, Gun and Cowlib remain
in the index.

2024/11/19: The deprecated defines `dep_fetch`, `dep_name`,
`dep_repo` and `dep_commit` have been removed
in favor of their `query_*` equivalents.
+
The deprecated legacy fetch method has also
been removed (`dep_cowboy = https://... ref`
without an explicit fetch method). Adding "git"
at the beginning of the dep line is the modern
equivalent.
2 changes: 2 additions & 0 deletions README.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,5 @@ http://erlang.mk/guide/getting_started.html[Get started]
Tested and supported on
http://erlang.mk/guide/installation.html#_on_unix[Linux, FreeBSD, OSX]
and http://erlang.mk/guide/installation.html#_on_windows[Windows].

Get help! https://discord.gg/x468ZsxG[Discord server].
6 changes: 3 additions & 3 deletions core/compat.mk
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ endef
define compat_rebar_config
{deps, [
$(call comma_list,$(foreach d,$(DEPS),\
$(if $(filter hex,$(call dep_fetch,$d)),\
{$(call dep_name,$d)$(comma)"$(call dep_repo,$d)"},\
{$(call dep_name,$d)$(comma)".*"$(comma){git,"$(call dep_repo,$d)"$(comma)$(call compat_ref,$(call dep_name,$d),$(call dep_commit,$d))}})))
$(if $(filter hex,$(call query_fetch_method,$d)),\
{$(call query_name,$d)$(comma)"$(call query_version_hex,$d)"},\
{$(call query_name,$d)$(comma)".*"$(comma){git,"$(call query_repo,$d)"$(comma)$(call compat_ref,$(call query_name,$d),$(call query_version,$d))}})))
]}.
{erl_opts, $(call compat_erlc_opts_to_list,$(ERLC_OPTS))}.
endef
Expand Down
14 changes: 7 additions & 7 deletions core/core.mk
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ verbose_0 = @
verbose_2 = set -x;
verbose = $(verbose_$(V))

ifeq ($(V),3)
ifeq ($V,3)
SHELL := $(SHELL) -x
endif

Expand Down Expand Up @@ -162,7 +162,7 @@ define newline
endef

define comma_list
$(subst $(space),$(comma),$(strip $(1)))
$(subst $(space),$(comma),$(strip $1))
endef

define escape_dquotes
Expand All @@ -180,23 +180,23 @@ else
core_native_path = $1
endif

core_http_get = curl -Lf$(if $(filter-out 0,$(V)),,s)o $(call core_native_path,$1) $2
core_http_get = curl -Lf$(if $(filter-out 0,$V),,s)o $(call core_native_path,$1) $2

core_eq = $(and $(findstring $(1),$(2)),$(findstring $(2),$(1)))
core_eq = $(and $(findstring $1,$2),$(findstring $2,$1))

# We skip files that contain spaces because they end up causing issues.
# Files that begin with a dot are already ignored by the wildcard function.
core_find = $(foreach f,$(wildcard $(1:%/=%)/*),$(if $(wildcard $f/.),$(call core_find,$f,$2),$(if $(filter $(subst *,%,$2),$f),$(if $(wildcard $f),$f))))

core_lc = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$(1)))))))))))))))))))))))))))
core_lc = $(subst A,a,$(subst B,b,$(subst C,c,$(subst D,d,$(subst E,e,$(subst F,f,$(subst G,g,$(subst H,h,$(subst I,i,$(subst J,j,$(subst K,k,$(subst L,l,$(subst M,m,$(subst N,n,$(subst O,o,$(subst P,p,$(subst Q,q,$(subst R,r,$(subst S,s,$(subst T,t,$(subst U,u,$(subst V,v,$(subst W,w,$(subst X,x,$(subst Y,y,$(subst Z,z,$1))))))))))))))))))))))))))

core_ls = $(filter-out $(1),$(shell echo $(1)))
core_ls = $(filter-out $1,$(shell echo $1))

# @todo Use a solution that does not require using perl.
core_relpath = $(shell perl -e 'use File::Spec; print File::Spec->abs2rel(@ARGV) . "\n"' $1 $2)

define core_render
printf -- '$(subst $(newline),\n,$(subst %,%%,$(subst ','\'',$(subst $(tab),$(WS),$(call $(1))))))\n' > $(2)
printf -- '$(subst $(newline),\n,$(subst %,%%,$(subst ','\'',$(subst $(tab),$(WS),$(call $1)))))\n' > $2
endef

# Automated update.
Expand Down
16 changes: 8 additions & 8 deletions core/deps-tools.mk
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,14 @@ list-deps list-doc-deps list-rel-deps list-test-deps list-shell-deps:
QUERY ?= name fetch_method repo version

define query_target
$(1): $(2) clean-tmp-query.log
$1: $2 clean-tmp-query.log
ifeq ($(IS_APP)$(IS_DEP),)
$(verbose) rm -f $(4)
$(verbose) rm -f $4
endif
$(verbose) $(foreach dep,$(3),\
echo $(PROJECT): $(foreach q,$(QUERY),$(call query_$(q),$(dep))) >> $(4) ;)
$(if $(filter-out query-deps,$(1)),,\
$(verbose) set -e; for dep in $(3) ; do \
$(verbose) $(foreach dep,$3,\
echo $(PROJECT): $(foreach q,$(QUERY),$(call query_$(q),$(dep))) >> $4 ;)
$(if $(filter-out query-deps,$1),,\
$(verbose) set -e; for dep in $3 ; do \
if grep -qs ^$$$$dep$$$$ $(ERLANG_MK_TMP)/query.log; then \
:; \
else \
Expand All @@ -123,8 +123,8 @@ endif
fi \
done)
ifeq ($(IS_APP)$(IS_DEP),)
$(verbose) touch $(4)
$(verbose) cat $(4)
$(verbose) touch $4
$(verbose) cat $4
endif
endef

Expand Down
Loading