Tabletop-RPG-Music / tabletop-rpg-music

A free and evergrowing collection of Fantasy and Sci Fi tracks for Foundry users. Support me at https://www.patreon.com/tabletoprpgmusic to help me keep writing!
19 stars 8 forks source link

FoundryVTT v10 Warnings #7

Open mikelococo opened 1 year ago

mikelococo commented 1 year ago

This module logs two warnings on FoundryVTT v10.291.0 that cause a yellow popup bar to appear on admin login:

setup.js:145 [tabletop-rpg-music] The module "tabletop-rpg-music" contains "dependencies" which is deprecated in favor of "relationships.requires"
setup.js:145 [tabletop-rpg-music] module "tabletop-rpg-music" contains "system" which is deprecated in favor of "relationships.systems"

These appear to be deprecated patterns in module.json that seem straightforward to address. Details are in the Migration 3: dependencies and systems to relationships section of https://foundryvtt.com/article/manifest-migration-guide/. Summarizing, these two lines need to change: https://github.com/Tabletop-RPG-Music/tabletop-rpg-music/blob/45dfbbf8676c4cfd4b7ba3bf1552cbb951be9a8c/module.json#L34-L35 to something like:

{
  "relationships": {
    "systems": [],
    "requires": []
  }
}

I haven't tested this particular change to verify that it's valid, but that would seem to translate the intent of the current lines into the new system. There's certainly a movement toward stricter definition of system-compatibility though, I'm not sure if any empty relationship there is valid anymore or not. The docs are clear on that point.

Swoogzy commented 1 year ago

I had two different warnings from this module that I finally decided to get rid of today. This is what I changed:

https://github.com/Tabletop-RPG-Music/tabletop-rpg-music/blob/45dfbbf8676c4cfd4b7ba3bf1552cbb951be9a8c/module.json#L34-L35

to

  "relationship.systems": [],
  "relationships.requires": [],

This resolved the issue and you no longer get comparability warnings within FoundryVTT v10.291.

Tabletop-RPG-Music commented 1 year ago

Hey, thanks for this, I'll update

Tabletop-RPG-Music commented 1 year ago

Actually, just to check, would this change break compatibility with versions of Foundry before v10?