smanza

smanza

Hello.

I have just published a new package named ex_license to manage license headers injection in the Elixir code source files.

While repositories can have a LICENSE file, nothing prevent someone to take a file and use it without restriction.
In other programming languages C, Go, … there are often tooling to inject headers of license but not in Elixir.

So this library embeds a mix task, to inject or to verify (usable in CI), to ensure an Elixir project maintains license headers.

To avoid the burden and uglify code file, it uses the SPDX convention which points a license with its ID

Thanks!

Showing Posts 1 to 7

jarlah

jarlah

thanks I’m actually using it now. Even though im not sure if it’s needed to tag every source file with a license header for legal reasons. But it’s easier to see at least that its covered in the same license the repo is licensed under

Kin

Kin

ELI5 anybody? What does this suppose to do? What is a license header? I hear about this for the first time.

jarlah

jarlah

if you have a LICENSE, its normally enough to have the LICENSE file at the root of the repo. There is no legal reasons to have the license embedded in code comments at top of each file. However, what ex_license solves is “indicating” instead the license at the top of each file. If you as a dev is looking into a source file and wonder about the license, just look at the header in the file and you will know. Fine for me, and generally I dont care too much about whats correct or not, as long as I make it easy for devs to know what license any part of the code is licensed under.

Kin

Kin

What about just using a VS Code extension that would show the current license of each of the file you are working on in the status bar or somewhere in the code - based on the license terms from the file in the root of the project (readme.md or license.md or whatever)?

I mean it is just another dependency in your Elixir codebase.

And a VS code extension is global - for all projects, meaning, it’s easier to maintain in one place as 1 VSCode plugin instead of 20 plugins for each of your Elixir projects.

smanza

smanza OP

The initial goal of this lib was to be compliant with SPDX licence specification.
For instance in many code bases there is license header in top of each files as multi lines comments.
This helps to identify the license for this code if you don’t have the whole repo by checking the LICENSE file.

The SPDX spec tends to unify and standardize it while being simplier to apply into codebase. (Single line comment)

To get more info please check out the spec: https://spdx.dev/learn/handling-license-info/

Kin

Kin

Hmm, interesting, so it just adds one comment line like:

# SPDX-License-Identifier: MIT

on top of each file, right?

jarlah

jarlah

Yes. Thats why I bothered with it for my new project. If it was adding the license on top of each file, meh ..

— All posts loaded —

Where Next? Top

Trending in Announcing Top

woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
MRdotB
I needed to reuse React components from my Chrome extension in my Phoenix/LiveView backend. I noticed that for Svelte/Vue, there are live...
New
woylie
I released Doggo, a collection of unstyled Phoenix components. https://github.com/woylie/doggo Features Unstyled Phoenix components....
New
marciok
Hi there! We created Gust: A task orchestrator inspired by Airflow. For those who have never heard about Aiflow, it’s a Python-based wor...
New
anuaralfetahe
Hello Published a new library - ProcessHub! ProcessHub is a library designed to manage process distribution within the Elixir cluster. ...
New
jimsynz
Beam Bots (or just BB for short) is a framework for building fault-tolerant robotics applications in Elixir using familiar OTP patterns. ...
New
Dmk
Xamal is a deployment tool for Elixir apps that deploys native releases to bare metal servers over SSH. It’s a port of GitHub - basecamp/...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
sergio
It’s not that it’s vocabulary is too advanced. It’s something worse. I get lost trying to follow even a paragraph written by Claude. It’...
New
AstonJ
This showed up on my feed.. anyone heard of it? Just hype? Ox Alpha is a reasoning model designed for coding, sustained ag...
New
sorenone
Today we’re releasing Oban for Python. Not an Oban client in Python. Not a pythonx wrapper embedded in Elixir. Nope, it’s a fully operati...
New
akoutmos
@hugobarauna, Dr. Dimitrios Koutmos (my brother) and I (Alex Koutmos) have been hard at work on writing a book on how you can use Elixir ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews