# Fpm version 0.8.2 released: centralized registry playground

**URL:** <https://fortran-lang.discourse.group/t/fpm-version-0-8-2-released-centralized-registry-playground/5792>\
**Category:** Announcements\
**Created:** [May 11, 2023, 4:16pm UTC](https://fortran-lang.discourse.group/t/fpm-version-0-8-2-released-centralized-registry-playground/5792 "2023-05-11T16:16:54Z")\
**Posts on this page:** 20\
**Page:** 2

<div class="post-metadata">

**Author:** ![urbanjost](https://avatars.discourse-cdn.com/v4/letter/u/0ea827/32.png) [@urbanjost](https://fortran-lang.discourse.group/u/urbanjost)\
**Post date:** [May 13, 2023, 10:02am UTC](https://fortran-lang.discourse.group/t/fpm-version-0-8-2-released-centralized-registry-playground/5792/21 "2023-05-13T10:02:13Z")

</div>

There are a lot of things to think about, I am sure. `I might have a package that only runs in a particular programming environment, like only on MSWindows or only with a particular compiler, so automating testing could be particularly problematic.

It is probably reasonable to make it difficult to remove packages so they can be relied on; so it would be useful for fpm(1) to be able to report when a package is deprecated. So if I find a bug in a package and put out a new release there would be some automated way `that someone using the package get a warning when using the package. That would be useful for fpm in general. If once released a package is immutable that that would be difficult to have a method that worked both for for a repository and for general user packages, for example.

If the repository is limited to 4.5 Megabytes it often could not include test data, extensive documentation, etc. But if not self-contained if the original package is removed or changed then that type of information will be lost.

Looking forward to the next iteration.

---

<div class="post-metadata">

**Author:** ![urbanjost](https://avatars.discourse-cdn.com/v4/letter/u/0ea827/32.png) [@urbanjost](https://fortran-lang.discourse.group/u/urbanjost)\
**Post date:** [May 15, 2023, 1:35pm UTC](https://fortran-lang.discourse.group/t/fpm-version-0-8-2-released-centralized-registry-playground/5792/22 "2023-05-15T13:35:14Z")

</div>

Limiting dependencies to the same registry seems problematic. If I want to use a graphics package, a unit testing framework, a linear algebra routine that is registered but not find in the same registry I could not use it as a dependency and still register the package? It seems like that would be very limiting, or require me to make copies (assuming the license allows it) of any package I wanted to use.

For fpm(1) packages I just have the same CD/CI script for everything, one file per environment I found or made on github; and they all just call “fpm test”. Packages that need infrastructure (ie. maybe the fpm(1) package is a wrapper for sqlite3, a graphics library, or any C/C++ library …) gets particularly complicated. A self-contained Fortran or C/C++ package is easy by comparison.  
So such “dependencies” cannot be part of the registry. Since those kinds of external dependencies will be common (IMO) allowing registered fpm(1) packages seems minor in comparison.

Why the restriction? Will packages be removable once registered?

Do you envision the automated tests being required just to register, or will they be run periodically?

Testing interactive packages, GUI and graphics interfaces, becomes really hard to completely automate.

I have several packages that require a platform to be POSIX-compliant; which vanilla MSWindows is not. So at a minimum automated tests would require allowing a selection of platforms to test on.

---

<div class="post-metadata">

**Author:** ![everythingfunctional](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/everythingfunctional/32/176_2.png) [@everythingfunctional](https://fortran-lang.discourse.group/u/everythingfunctional)\
**Post date:** [May 15, 2023, 2:23pm UTC](https://fortran-lang.discourse.group/t/fpm-version-0-8-2-released-centralized-registry-playground/5792/23 "2023-05-15T14:23:13Z")

</div>

> [@FedericoPerini](#):
>
> So, all registry-fit packages should only include dependencies from the same registry

This poses a Catch-22 problem for packages with mutual dependency. I.e. my `veggies` test framework uses `iso_varying_string`, but `iso_varying_string` uses `veggies` for testing. How could I initially get either of them added to the registry?

I think we should encourage packages to use dependencies from the (a) registry, and not directly from a git repository, but I don’t think it should be enforced by the registry upload mechanism.

---

<div class="post-metadata">

**Author:** ![FedericoPerini](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/federicoperini/32/1750_2.png) [@FedericoPerini](https://fortran-lang.discourse.group/u/FedericoPerini)\
**Post date:** [May 15, 2023, 3:07pm UTC](https://fortran-lang.discourse.group/t/fpm-version-0-8-2-released-centralized-registry-playground/5792/24 "2023-05-15T15:07:33Z")

</div>

Well I believe that would be a circular dependency, not exactly smooth to deal with.

Unless I assume there’s an early version of `veggies` that does not rely on `iso_varying_string` or the other way around. This is the only chance that a first build can ever have happened. So you could start uploading the version that doesn’t depend on the other, and keep building from that:

- publish veggies 0.1.0 (no dependencies)
- publish iso\_varying\_string 0.1.0 (depends on veggies 0.1.0)
- publish veggies 0.2.0 (depends on iso\_varying\_string 0.1.0)  
etc…

These issues will become less and less likely as the registry becomes more populated. Another option might be to allow batch uploads, where intertwined packages can be uploaded simultaneously, but I’m not sure I’m a fan of that.

Another option is to just let people use any git dependencies also in registry packages. What would be the drawbacks of such a decision?

---

<div class="post-metadata">

**Author:** ![ivanpribec](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/ivanpribec/32/3290_2.png) [@ivanpribec](https://fortran-lang.discourse.group/u/ivanpribec)\
**Post date:** [May 15, 2023, 3:13pm UTC](https://fortran-lang.discourse.group/t/fpm-version-0-8-2-released-centralized-registry-playground/5792/25 "2023-05-15T15:13:48Z")

</div>

> [@everythingfunctional](#):
>
> but `iso_varying_string` uses `veggies` for testing.

This sounds like a development dependency only, so technically you probably want to upload `iso_varying_string` first.

---

<div class="post-metadata">

**Author:** ![everythingfunctional](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/everythingfunctional/32/176_2.png) [@everythingfunctional](https://fortran-lang.discourse.group/u/everythingfunctional)\
**Post date:** [May 15, 2023, 4:16pm UTC](https://fortran-lang.discourse.group/t/fpm-version-0-8-2-released-centralized-registry-playground/5792/26 "2023-05-15T16:16:21Z")

</div>

> [@ivanpribec](#):
>
> This sounds like a development dependency only, so technically you probably want to upload `iso_varying_string` first.

Correct. If it’s not enforced for `[dev-dependences]` then I think I’m fine.

---

<div class="post-metadata">

**Author:** ![certik](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/certik/32/4_2.png) [@certik](https://fortran-lang.discourse.group/u/certik)\
**Post date:** [May 15, 2023, 5:28pm UTC](https://fortran-lang.discourse.group/t/fpm-version-0-8-2-released-centralized-registry-playground/5792/27 "2023-05-15T17:28:11Z")

</div>

Circular dependencies indeed are quite a special case and hopefully can be avoided. If needed, we can allow overriding the default with a command line flag or some flag in fpm.toml.

---

<div class="post-metadata">

**Author:** ![minhdao](https://avatars.discourse-cdn.com/v4/letter/m/c2a13f/32.png) [@minhdao](https://fortran-lang.discourse.group/u/minhdao)\
**Post date:** [May 15, 2023, 6:05pm UTC](https://fortran-lang.discourse.group/t/fpm-version-0-8-2-released-centralized-registry-playground/5792/28 "2023-05-15T18:05:03Z")

</div>

Thanks @vmagnin, some of the bugs should be fixed now:

> <https://github.com/fortran-lang/fpm/pull/912>
>
> Closes https://github.com/fortran-lang/fpm/issues/905.
> 
> Not obtain the \`tmp\` f…older from \`env\` but use the \`get\_temp\_filename\` routine.
> 
> \*\*How to test\*\*
> 
> Publish a package to the registry using \`fpm publish\`.

> <https://github.com/fortran-lang/fpm/pull/913>
>
> See #909. 
> 
> On network connectivity issues, it's safe to fallback to a release… version that is known. 
> 
> This does not prevent the next step (download single-file source) to fail if the network is down though.
> 
> cc: @barracuda156

> <https://github.com/fortran-lang/fpm/pull/914>
>
> Closes https://github.com/fortran-lang/fpm/issues/907.
> 
> Fix return type of \`c\_…realpath\` by changing it from \`int\` to \`char\*\`.

Considering `fpm help` (@urbanjost), yes that will absolutely be added. But for now you can refer to the fpm docs, which have just been updated.

Global config file and registry settings:

[https://fpm.fortran-lang.org/en/spec/manifest.html#global-config-file](https://fpm.fortran-lang.org/en/spec/manifest.html#global-config-file)

Manifest configs:

[https://fpm.fortran-lang.org/en/spec/manifest.html#dependencies-from-a-registry](https://fpm.fortran-lang.org/en/spec/manifest.html#dependencies-from-a-registry)

Package upload:

[https://fpm.fortran-lang.org/en/spec/publish.html](https://fpm.fortran-lang.org/en/spec/publish.html)

---

<div class="post-metadata">

**Author:** ![vmagnin](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/vmagnin/32/28_2.png) [@vmagnin](https://fortran-lang.discourse.group/u/vmagnin)\
**Post date:** [May 15, 2023, 7:32pm UTC](https://fortran-lang.discourse.group/t/fpm-version-0-8-2-released-centralized-registry-playground/5792/29 "2023-05-15T19:32:59Z")

</div>

Thanks @minhdao !  
I confirm that it now works in Linux Ubuntu 23.04. I have published gtk-fortran in the registry site.

I then tried with my `gtkzero_fpm` repository, which uses gtk-fortran as a dependency but obtained that message:

```bash
gtkzero_fpm$ fpm publish --token e......................3
<ERROR> Do not publish packages containing git dependencies. 'gtk-fortran' is a git dependency.
STOP 1

```

With other projects like my musical projects Forsynth and Formidi, I have obtained that message:

```bash
formidi$ fpm publish --token e....................3
 Uploading package ...
{"code":400,"message":"Invalid license identifier GNU GPLv3. Please check the SPDX license identifier list."}

```

It seems I should use `license = "GPL-3.0-or-later"` instead in my `fpm.toml` files.

---

<div class="post-metadata">

**Author:** ![vmagnin](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/vmagnin/32/28_2.png) [@vmagnin](https://fortran-lang.discourse.group/u/vmagnin)\
**Post date:** [May 15, 2023, 7:57pm UTC](https://fortran-lang.discourse.group/t/fpm-version-0-8-2-released-centralized-registry-playground/5792/30 "2023-05-15T19:57:36Z")

</div>

After updating the `fpm.toml` file with `"GPL-3.0-or-later"`, I have successfully uploaded my Formidi project in a `music` namespace:

```bash
formidi$ fpm publish --token 8.............7
 Uploading package ...
{"code":200,"message":"Package Uploaded Successfully."}

```

I have got a question about the philosophy of namespaces: how should we name them? For example, for my musical projects should I create a `music` namespace? or a `vmagnin_music` namespace?

In the first case, it would be for anybody and I could add admins using the web interface. I guess that a new admin could also add other admins in that namespace? If I understand, each admin is responsible for accepting or rejecting new projects inside the namespace?

---

<div class="post-metadata">

**Author:** ![arteevraina](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@arteevraina](https://fortran-lang.discourse.group/u/arteevraina)\
**Post date:** [May 16, 2023, 5:56am UTC](https://fortran-lang.discourse.group/t/fpm-version-0-8-2-released-centralized-registry-playground/5792/31 "2023-05-16T05:56:58Z")

</div>

When naming namespaces, it is important to choose names that are descriptive and easy to remember. The name should give users a good idea of what the namespace contains.

Regarding the convention, I would follow the Fortran variable name naming conventions. But, we don’t necessary want to limit the namespace naming using variable naming convention.

We also have some basic checks for namespace naming implemented [here](https://github.com/fortran-lang/registry/blob/main/flask/namespaces.py#L39).

Regarding the roles of the different users. Here is the documentation :

### Roles in Fpm Registry.

- Namespace Admins.

- Namespace Maintainers.

- Package Maintainers.

- **Namespace Admins:**

- **Namespace maintainers:**

- **Package maintainers:**

---

<div class="post-metadata">

**Author:** ![arteevraina](https://avatars.discourse-cdn.com/v4/letter/a/b5ac83/32.png) [@arteevraina](https://fortran-lang.discourse.group/u/arteevraina)\
**Post date:** [May 16, 2023, 6:00am UTC](https://fortran-lang.discourse.group/t/fpm-version-0-8-2-released-centralized-registry-playground/5792/32 "2023-05-16T06:00:10Z")

</div>

Thanks for mentioning this. We are currently accepting the license identifiers that are mentioned [here](https://spdx.org/licenses/)

This is also mentioned in the documentation [Package upload — Fortran Package Manager](https://fpm.fortran-lang.org/en/spec/publish.html#license)

---

<div class="post-metadata">

**Author:** ![vmagnin](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/vmagnin/32/28_2.png) [@vmagnin](https://fortran-lang.discourse.group/u/vmagnin)\
**Post date:** [May 16, 2023, 7:24am UTC](https://fortran-lang.discourse.group/t/fpm-version-0-8-2-released-centralized-registry-playground/5792/33 "2023-05-16T07:24:16Z")

</div>

Thanks for these details @arteevraina  
I will translate the doc when I have time.

---

<div class="post-metadata">

**Author:** ![urbanjost](https://avatars.discourse-cdn.com/v4/letter/u/0ea827/32.png) [@urbanjost](https://fortran-lang.discourse.group/u/urbanjost)\
**Post date:** [May 16, 2023, 12:44pm UTC](https://fortran-lang.discourse.group/t/fpm-version-0-8-2-released-centralized-registry-playground/5792/34 "2023-05-16T12:44:39Z")

</div>

If fpm is built in debug mode, any dependency I tried from the test repository gets this traceback:

> **traceback**
>
> At line 184 of file build/dependencies/jonquil/src/jonquil/lexer.f90  
> Fortran runtime error: Substring out of bounds: upper bound (712) of ‘lexer’ exceeds string length (711)
> 
> Error termination. Backtrace:  
> #0 0x1463305ad700 in ???  
> #1 0x1463305ae259 in ???  
> #2 0x1463305ae8d6 in ???  
> #3 0x560e779c167e in next\_token  
> at build/dependencies/jonquil/src/jonquil/lexer.f90:184  
> #4 0x560e779c1c31 in \_\_jonquil\_lexer\_MOD\_next  
> at build/dependencies/jonquil/src/jonquil/lexer.f90:159  
> #5 0x560e778e0f98 in next\_token  
> at build/dependencies/toml-f/src/tomlf/de/parser.f90:760  
> #6 0x560e778e2eef in consume  
> at build/dependencies/toml-f/src/tomlf/de/parser.f90:658  
> #7 0x560e778e39f2 in parse\_inline\_table  
> at build/dependencies/toml-f/src/tomlf/de/parser.f90:611  
> #8 0x560e778e4bf4 in parse\_keyval  
> at build/dependencies/toml-f/src/tomlf/de/parser.f90:494  
> #9 0x560e778e994c in parse\_root  
> at build/dependencies/toml-f/src/tomlf/de/parser.f90:134  
> #10 0x560e778ea358 in \_\_tomlf\_de\_parser\_MOD\_parse  
> at build/dependencies/toml-f/src/tomlf/de/parser.f90:105  
> #11 0x560e779be0fc in \_\_jonquil\_parser\_MOD\_json\_load\_file  
> at build/dependencies/jonquil/src/jonquil/parser.f90:71  
> #12 0x560e779710cc in \_\_fpm\_downloader\_MOD\_get\_pkg\_data  
> at ././src/fpm/downloader.f90:42  
> #13 0x560e7785d15b in \_\_fpm\_dependency\_MOD\_get\_from\_registry  
> at ././src/fpm/dependency.f90:678  
> #14 0x560e7785e41c in \_\_fpm\_dependency\_MOD\_resolve\_dependency  
> at ././src/fpm/dependency.f90:594  
> #15 0x560e77862c9a in \_\_fpm\_dependency\_MOD\_resolve\_dependencies  
> at ././src/fpm/dependency.f90:555  
> #16 0x560e7786866d in \_\_fpm\_dependency\_MOD\_add\_project  
> at ././src/fpm/dependency.f90:327  
> #17 0x560e777c3352 in \_\_fpm\_MOD\_build\_model  
> at ././src/fpm.f90:55  
> #18 0x560e777a9ca3 in **fpm\_MOD\_cmd\_run  
> at ././src/fpm.f90:560  
> #19 0x560e77773291 in MAIN**  
> at app/main.f90:78  
> #20 0x560e77773791 in main  
> at app/main.f90:12
> 
> - mkdir -p build/dependencies  
> Downloading ‘[https://registry-apis.vercel.app/packages/GPF/M\_orderpack](https://registry-apis.vercel.app/packages/GPF/M_orderpack)’ → ‘/tmp/fileKIj3XD’

---

<div class="post-metadata">

**Author:** ![FedericoPerini](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/federicoperini/32/1750_2.png) [@FedericoPerini](https://fortran-lang.discourse.group/u/FedericoPerini)\
**Post date:** [May 16, 2023, 1:06pm UTC](https://fortran-lang.discourse.group/t/fpm-version-0-8-2-released-centralized-registry-playground/5792/35 "2023-05-16T13:06:22Z")

</div>

@urbanjost see [`lexer%chunk` out of bounds in Windows build · Issue #15 · toml-f/jonquil (github.com)](https://github.com/toml-f/jonquil/issues/15): are you using gcc/gfortran \<=9?

I had also found that issue, haven’t dug deeper, but that is solved by upgrading to gfortran-10.

---

<div class="post-metadata">

**Author:** ![vmagnin](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/vmagnin/32/28_2.png) [@vmagnin](https://fortran-lang.discourse.group/u/vmagnin)\
**Post date:** [May 16, 2023, 2:10pm UTC](https://fortran-lang.discourse.group/t/fpm-version-0-8-2-released-centralized-registry-playground/5792/36 "2023-05-16T14:10:37Z")

</div>

> [@arteevraina](#):
>
> This is also mentioned in the documentation [Package upload — Fortran Package Manager](https://fpm.fortran-lang.org/en/spec/publish.html#license)

Weblate seems not synchronized with the fpm doc site. The French translation is still at 100%, although I have not yet translated these pages:  
_- Module name requirements_  
_- Package upload_  
_- Fpm version 0.8.? released_  
and also additions in the _Manifest reference_ page.

---

<div class="post-metadata">

**Author:** ![urbanjost](https://avatars.discourse-cdn.com/v4/letter/u/0ea827/32.png) [@urbanjost](https://fortran-lang.discourse.group/u/urbanjost)\
**Post date:** [May 16, 2023, 3:14pm UTC](https://fortran-lang.discourse.group/t/fpm-version-0-8-2-released-centralized-registry-playground/5792/37 "2023-05-16T15:14:23Z")

</div>

Using gfortran-11. Not where I can look but a quick glance looks like it is exceeding bounds; suggested fix probably has a a redundancy in it; can look later but perhaps some tests passed because compiled with array bound checks on? Will run (and smack memory) without bound checks on.

---

<div class="post-metadata">

**Author:** ![FedericoPerini](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/federicoperini/32/1750_2.png) [@FedericoPerini](https://fortran-lang.discourse.group/u/FedericoPerini)\
**Post date:** [May 16, 2023, 3:35pm UTC](https://fortran-lang.discourse.group/t/fpm-version-0-8-2-released-centralized-registry-playground/5792/38 "2023-05-16T15:35:40Z")

</div>

Please open a PR on the fpm page and we can better investigate. Are you building fpm with `fpm build —profile=debug` ?

---

<div class="post-metadata">

**Author:** ![urbanjost](https://avatars.discourse-cdn.com/v4/letter/u/0ea827/32.png) [@urbanjost](https://fortran-lang.discourse.group/u/urbanjost)\
**Post date:** [May 16, 2023, 4:07pm UTC](https://fortran-lang.discourse.group/t/fpm-version-0-8-2-released-centralized-registry-playground/5792/39 "2023-05-16T16:07:44Z")

</div>

yes. Building it multiple ways but that way generates the traceback shown.

---

<div class="post-metadata">

**Author:** ![Carltoffel](https://yyz2.discourse-cdn.com/free1/user_avatar/fortran-lang.discourse.group/carltoffel/32/1680_2.png) [@Carltoffel](https://fortran-lang.discourse.group/u/Carltoffel)\
**Post date:** [May 17, 2023, 6:37am UTC](https://fortran-lang.discourse.group/t/fpm-version-0-8-2-released-centralized-registry-playground/5792/40 "2023-05-17T06:37:16Z")

</div>

Would someone kindly provide some insight into where the exact specifications of the registry were discussed, and what it is intended to cover? At the moment, I’m trying to understand the advantages of utilizing such a registry over a straightforward GitHub/GitLab repository, where it seems relatively simple to report bugs or submit pull requests.

[Previous page](https://fortran-lang.discourse.group/t/fpm-version-0-8-2-released-centralized-registry-playground/5792.md?page=1)

[Next page](https://fortran-lang.discourse.group/t/fpm-version-0-8-2-released-centralized-registry-playground/5792.md?page=3)
