-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Javaupdate #9254
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
base: master
Are you sure you want to change the base?
Javaupdate #9254
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,2 @@ | ||
- Marks Java 11 and below as deprecated. Support will be dropped in Firebase CLI v15. Please upgrade to Java version 21 or above to continue using the emulators. | ||
- Fix Functions MCP log tool to normalize sort order and surface Cloud Logging error details (#9247) |
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -82,7 +82,7 @@ | |||||||||||||||
* specify an emulator address. | ||||||||||||||||
*/ | ||||||||||||||||
export function printNoticeIfEmulated( | ||||||||||||||||
options: any, | ||||||||||||||||
emulator: Emulators.DATABASE | Emulators.FIRESTORE, | ||||||||||||||||
): void { | ||||||||||||||||
if (emulator !== Emulators.DATABASE && emulator !== Emulators.FIRESTORE) { | ||||||||||||||||
|
@@ -110,7 +110,7 @@ | |||||||||||||||
* an emulator port that the command actually talks to production. | ||||||||||||||||
*/ | ||||||||||||||||
export async function warnEmulatorNotSupported( | ||||||||||||||||
options: any, | ||||||||||||||||
emulator: Emulators.DATABASE | Emulators.FIRESTORE, | ||||||||||||||||
): Promise<void> { | ||||||||||||||||
if (emulator !== Emulators.DATABASE && emulator !== Emulators.FIRESTORE) { | ||||||||||||||||
|
@@ -137,8 +137,8 @@ | |||||||||||||||
} | ||||||||||||||||
} | ||||||||||||||||
|
||||||||||||||||
export async function errorMissingProject(options: any): Promise<void> { | ||||||||||||||||
Check warning on line 140 in src/emulator/commandUtils.ts
|
||||||||||||||||
if (!options.project) { | ||||||||||||||||
throw new FirebaseError( | ||||||||||||||||
"Project is not defined. Either use `--project` or use `firebase use` to set your active project.", | ||||||||||||||||
); | ||||||||||||||||
|
@@ -149,12 +149,12 @@ | |||||||||||||||
* Utility method to be inserted in the "before" function for a command that | ||||||||||||||||
* uses the emulator suite. | ||||||||||||||||
*/ | ||||||||||||||||
export async function beforeEmulatorCommand(options: any): Promise<any> { | ||||||||||||||||
Check warning on line 152 in src/emulator/commandUtils.ts
|
||||||||||||||||
const optionsWithDefaultConfig = { | ||||||||||||||||
...options, | ||||||||||||||||
config: DEFAULT_CONFIG, | ||||||||||||||||
}; | ||||||||||||||||
const optionsWithConfig = options.config ? options : optionsWithDefaultConfig; | ||||||||||||||||
Check warning on line 157 in src/emulator/commandUtils.ts
|
||||||||||||||||
|
||||||||||||||||
// We want to be able to run most emulators even in the absence of | ||||||||||||||||
// firebase.json. For Functions and Hosting we require the JSON file since the | ||||||||||||||||
|
@@ -587,7 +587,7 @@ | |||||||||||||||
}); | ||||||||||||||||
} | ||||||||||||||||
|
||||||||||||||||
export const MIN_SUPPORTED_JAVA_MAJOR_VERSION = 11; | ||||||||||||||||
export const MIN_SUPPORTED_JAVA_MAJOR_VERSION = 21; | ||||||||||||||||
export const JAVA_DEPRECATION_WARNING = | ||||||||||||||||
"firebase-tools no longer supports Java versions before 11. " + | ||||||||||||||||
"Please install a JDK at version 11 or above to get a compatible runtime."; | ||||||||||||||||
"firebase-tools will drop support for Java version < 21 soon in firebase-tools@15. " + | ||||||||||||||||
"Please install a JDK at version 21 or above to get a compatible runtime."; | ||||||||||||||||
Comment on lines
591
to
+593
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For improved readability, you can combine this into a single string on one line, removing the need for concatenation.
Suggested change
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changelog entry is inaccurate. The code changes deprecate Java versions
< 21
, not just11 and below
. To avoid confusion, please update the changelog to reflect this. A more active phrasing would also improve readability.For example:
Deprecated Java versions below 21. Support will be dropped in Firebase CLI v15. Please upgrade to Java version 21 or above to continue using the emulators.