Skip to content

Commit

Permalink
Raise limit of editable arches apps to 9 #11274
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtylerwalls authored and chiatt committed Aug 6, 2024
1 parent 02f1de4 commit c1ac2e3
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 4 deletions.
47 changes: 43 additions & 4 deletions arches/app/media/js/utils/load-component-dependencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,22 +9,61 @@ define([], function() {
require(`${SITE_PACKAGES_DIRECTORY}/${archesApp}/media/js/${componentPath}`);
break;
}
catch(e) { // handles egg/wheel links, cannot access them programatically hence manual access
// Handle editable installations (with pip install -e).
// Webpack needs string literals, hence arbitrary limit of 9.
// https://github.com/archesproject/arches/issues/11274
catch(e) {
try {
require(`${LINKED_APPLICATION_PATH_0}/media/js/${componentPath}`);
break;
}
catch { // handles egg/wheel links, cannot access them programatically hence manual access
catch {
try {
require(`${LINKED_APPLICATION_PATH_1}/media/js/${componentPath}`);
break;
}
catch { // handles egg/wheel links, cannot access them programatically hence manual access
catch {
try {
require(`${LINKED_APPLICATION_PATH_2}/media/js/${componentPath}`);
break;
}
catch { throw new Error(); } // if all attempts fail within the loop, throw error for outer try/catch
catch {
try {
require(`${LINKED_APPLICATION_PATH_3}/media/js/${componentPath}`);
break;
}
catch {
try {
require(`${LINKED_APPLICATION_PATH_4}/media/js/${componentPath}`);
break;
}
catch {
try {
require(`${LINKED_APPLICATION_PATH_5}/media/js/${componentPath}`);
break;
}
catch {
try {
require(`${LINKED_APPLICATION_PATH_6}/media/js/${componentPath}`);
break;
}
catch {
try {
require(`${LINKED_APPLICATION_PATH_7}/media/js/${componentPath}`);
break;
}
catch {
try {
require(`${LINKED_APPLICATION_PATH_8}/media/js/${componentPath}`);
break;
}
catch { throw new Error(); } // if all attempts fail within the loop, throw error for outer try/catch
}
}
}
}
}
}
}
}
}
Expand Down
1 change: 1 addition & 0 deletions releases/7.6.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Arches 7.6.0 Release Notes
- 10754 Move the i18n/ url outside of the i18n_patterns function
- Fixes hard coded Polygon geometry type in geo_utils.convert_multipart_to_singlepart #11218
- Fixes geocoder placeholder #11173
- 11274 Raise limit of editable installs of arches applications from 3 to 9
- Allow minzoom and maxzoom to be applied to a resource map source from a geojson node config #10929
- 11080 Allow arbitrarily large geometries with > 1500 points and an ES document > 32k bytes
- 11044 Ensure Saved Searches sortorder is used when called from system settings
Expand Down

0 comments on commit c1ac2e3

Please sign in to comment.