AtomVM icon indicating copy to clipboard operation
AtomVM copied to clipboard

Docs: Add Range.size, update exavmlib deps

Open petermm opened this issue 11 months ago • 4 comments

And a small fix to Base.ex adding @compile {:autoload, false}.

This enables running mix docs on exavmlib. mix docs --version 0.7.0

These changes are made under both the "Apache 2.0" and the "GNU Lesser General Public License 2.1 or later" license terms (dual license).

SPDX-License-Identifier: Apache-2.0 OR LGPL-2.1-or-later

petermm avatar Feb 01 '25 07:02 petermm

turns out Range.size was only added elixir 1.12 - so blocked for now:/

petermm avatar Feb 05 '25 18:02 petermm

Maybe it can be conditionally included, we don't have Version.match? or we could do something similar to what is done here:

https://github.com/elixir-cldr/cldr_utils/blob/44a530f17c3a7265339c3104304f0abfb2eb4687/lib/cldr/decimal/decimal.ex#L24

but maybe there is another clever way to check if the Elixir version is high enough for it to be included.

Also for reference: https://elixirforum.com/t/how-to-assign-a-function-to-a-specific-version-of-elixir/42113

UncleGrumpy avatar Feb 05 '25 19:02 UncleGrumpy

Thanks for the pointers, added if Version.match?(System.version(), "~> 1.12") do - and the CI seems happy..

I don't like having to do this - but I like future ex_doc support - hmm.

petermm avatar Feb 05 '25 22:02 petermm

I can see it leading to some confusion, since the function will appear in the documentation, but won't be available on VMs complied with an older version of Elixir. We should keep the @since pointing at the AtomVM version, but maybe in the doc text it should mention the minimum Elixir version that is required.

UncleGrumpy avatar Feb 06 '25 16:02 UncleGrumpy