Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move heroku/nodejs group to the end #577

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Move heroku/nodejs group to the end #577

wants to merge 1 commit into from

Conversation

dzuelke
Copy link
Contributor

@dzuelke dzuelke commented Sep 9, 2024

Apps written in other languages often have a package.json, and the current order causes these to be detected as a Node.js codebase.

N.b. the diff for heroku-20 is just a bit funky looking, it's really the same as for the two others when you look at it with git diff --patience:

diff --git a/builder-20/builder.toml b/builder-20/builder.toml
index 097d01f..c09b53c 100644
--- a/builder-20/builder.toml
+++ b/builder-20/builder.toml
@@ -89,18 +89,6 @@ version = "0.20.1"
     id = "heroku/eol-warning"
     version = "1.0.0"
 
-[[order]]
-  [[order.group]]
-    id = "heroku/nodejs"
-    version = "3.2.13"
-  [[order.group]]
-    id = "heroku/procfile"
-    version = "3.1.2"
-    optional = true
-  [[order.group]]
-    id = "heroku/eol-warning"
-    version = "1.0.0"
-
 [[order]]
   [[order.group]]
     id = "heroku/java"
@@ -148,3 +136,16 @@ version = "0.20.1"
   [[order.group]]
     id = "heroku/eol-warning"
     version = "1.0.0"
+
+# this group is intentionally at the end, because projects in other languages often have e.g. a package.json
+[[order]]
+  [[order.group]]
+    id = "heroku/nodejs"
+    version = "3.2.13"
+  [[order.group]]
+    id = "heroku/procfile"
+    version = "3.1.2"
+    optional = true
+  [[order.group]]
+    id = "heroku/eol-warning"
+    version = "1.0.0"

GUS-W-16712980

Apps written in other languages often have a package.json, and the current order causes these to be detected as a Node.js codebase.
@dzuelke dzuelke requested a review from a team as a code owner September 9, 2024 18:35
@@ -137,10 +137,11 @@ version = "0.20.1"
id = "heroku/eol-warning"
version = "1.0.0"

# this group is intentionally at the end, because projects in other languages often have e.g. a package.json
Copy link
Member

@joshwlewis joshwlewis Sep 10, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no issues with moving Node.js to the end. I think most specific to least specific is a pretty good strategy that the Node.js buildpack uses to resolve package manager selection, and I think it makes sense for language selection too.

However -- couldn't this also be solved by adding an optional heroku/nodejs to the heroku/php group? Basically, solve this the way heroku/ruby is?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The issue is that for many of these projects, there is no lock file for package.json, so the build would fail - a new Laravel framework skeleton project, for example.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants