Page MenuHomePhabricator

Is the bytecode or cache not updated until a Module is edited?
Closed, ResolvedPublic

Description

While editing :c:Module:FormatJSON, I noticed a JSON parser error due to T184694 after saving. The weird thing is that before editing the module it worked² in spite the JSON processed was invalid according to today's parser. Does this imply that Modules or their byte code (and more importantly - dependency code) are cached?

²works = the data input changed and the output was created without any error

Event Timeline

Rillke created this task.Jul 30 2019, 3:19 PM
Restricted Application added subscribers: Liuxinyu970226, Aklapper. · View Herald TranscriptJul 30 2019, 3:19 PM
Rillke updated the task description. (Show Details)Jul 30 2019, 3:23 PM
Anomie closed this task as Resolved.Aug 13 2019, 4:43 PM
Anomie claimed this task.
Anomie added a subscriber: Anomie.

Does this imply that Modules or their byte code (and more importantly - dependency code) are cached?

There is no caching of the type you're asking about. Output in using the module is cached in the same way that template output in pages using a template is cached. Most likely you ran into T214984: PHP7's stricter JSON parsing breaks some wiki content.

As the question asked was answered, marking the task as "resolved".

output in pages using a template is cached

How is it possible that after updating the input, the Module output was still generated, but after doing a small change to the Module (which shouldn't trigger any JSON errors), the code errored out with that JSON error and continued to do so after reverting?

The answer probably is that while updating the input HHVM was used and while editing the module PHP7. This is a bit confusing but not entirely opaque due to the tags.

The answer probably is that while updating the input HHVM was used and while editing the module PHP7. This is a bit confusing but not entirely opaque due to the tags.

That would be exactly my guess.

Aklapper removed a subscriber: Anomie.Oct 16 2020, 5:38 PM