I want to understand the reason of this deprecation messages. Is batch.js comes from Jira core? Or…how it works?
Hi @piskunovigorm, these are reasonable questions to ask
The batch.js
file is something that Jira itself constructs and serves. There can be several per page, and their contents can vary depending on what features are present on a given page.
The original mechanism for constructing these batch files in Atlassian products is the Web Resource Manager and Atlassian’s P2 plugin system. There are other mechanisms in Cloud products, but this is the most likely source of a batch.js
file.
Since Cloud products use Atlassian Connect instead of P2 for enabling their plugins, there is a clear division between Atlassian’s code and plugin’s code – the batch.js
files will only contain code that Atlassian developers have written.
That covers where the batch file comes from, but not where the deprecations come from.
Atlassian’s products are written by numerous teams and composed of a myriad of components. Each team has the ability to deprecate aspects of their components and log a message to indicate that a deprecated code path is being used. This deprecation mechanism is rather blunt: if the deprecated code path is used, a message is logged – it doesn’t matter whether it’s “your” code or someone else’s; it doesn’t matter if the application is in development or production mode.
With this context: the most likely reason for seeing these deprecation messages is that one team released a newer version of their component, the core product team updated to a dependency that ships this version + the old version, and there are still usages of the older version in the product’s UI code.
For the deprecation messages to disappear, the old component version usage would need to be refactored out by the product team.
The reason you need not worry about these messages in Cloud is because of that division I mentioned earlier: Atlassian Connect code is largely unaffected by the UI code the core product ships. The core product team is responsible for ensuring its UI continues to work after upgrading dependencies; the deprecation message is there to inform them of technical debt to be downpaid before they can upgrade that dependency again.
Hope that helps clarify further. If you’ve got follow-up questions, don’t hesitate to ask them
Cheers,
Daz