File tree Expand file tree Collapse file tree 4 files changed +17
-0
lines changed
tools/rail_inspector/lib/rail_inspector/configuring/check Expand file tree Collapse file tree 4 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -60,6 +60,8 @@ Below are the default values associated with each target version. In cases of co
60
60
61
61
#### Default Values for Target Version 8.1
62
62
63
+ - [ ` config.yjit ` ] ( #config-yjit ) : ` !Rails.env.local? `
64
+
63
65
#### Default Values for Target Version 8.0
64
66
65
67
- [ ` Regexp.timeout ` ] ( #regexp-timeout ) : ` 1 `
@@ -644,6 +646,7 @@ deploying to a memory constrained environment you may want to set this to `false
644
646
| --------------------- | -------------------- |
645
647
| (original) | ` false ` |
646
648
| 7.2 | ` true ` |
649
+ | 8.1 | ` !Rails.env.local? ` |
647
650
648
651
### Configuring Assets
649
652
Original file line number Diff line number Diff line change
1
+ * Don't enable YJIT in development and test environments
2
+
3
+ Development and test environment tend to reload code and redefine methods (e.g. mocking),
4
+ hence YJIT isn't generally faster in these environments.
5
+
6
+ * Ali Ismayilov* , * Jean Boussier*
7
+
1
8
* Only include PermissionsPolicy::Middleware if policy is configured.
2
9
3
10
* Petrik de Heus*
Original file line number Diff line number Diff line change @@ -348,6 +348,11 @@ def load_defaults(target_version)
348
348
Regexp . timeout ||= 1 if Regexp . respond_to? ( :timeout= )
349
349
when "8.1"
350
350
load_defaults "8.0"
351
+
352
+ # Development and test environment tend to reload code and
353
+ # redefine methods (e.g. mocking), hence YJIT isn't generally
354
+ # faster in these environments.
355
+ self . yjit = !Rails . env . local?
351
356
else
352
357
raise "Unknown version #{ target_version . to_s . inspect } "
353
358
end
Original file line number Diff line number Diff line change @@ -21,6 +21,8 @@ def check
21
21
22
22
next if defaults_file_content . include? app_config
23
23
24
+ next if config == "self.yjit"
25
+
24
26
add_error ( config )
25
27
end
26
28
end
You can’t perform that action at this time.
0 commit comments