☂ Identify Performance Issues

Is there an existing issue for this?

[X] I have searched the existing issues

Do you want this issue prioritized?

[X] Yes, I have sponsored
[ ] Not urgent

Current Behavior
Let's find if there are any performance problems that have been identified in #322 (and somewhere else for skeletons.)
I think there may have been a regression with Moti related to reanimated 3 causing issues for MotiPressable and Skeleton. It's possible it's a simple fix. I'd also like to compare Animated.View with MotiView directly to identify potential causes.
From what I've heard, the issue lies somewhere in useMotify. It is likely worklet related (I think).
I welcome any feedback and support on how to identify performance issues. Thank you!
Expected Behavior
It should be as fast as Reanimated raw.
Steps To Reproduce
No response
Versions
- Moti: Latest

Screenshots
No response
Reproduction
N/A

After updating from Expo SDK 50 to SDK 51 (react-native-reanimated 3.6.2 to 3.10.1), there were big performance issues using Moti, but it seems evident that the problem lies within 'react-native-reanimated` as stated by @efstathiosntonas in #322. There have been multiple issues raised relating to performance degradation since version 3.6.1, in addition to 5800 namely 5816, 5781, even though all are not probably related to this one mentioned here in Moti.
I am just mentioning this here to add some information.

i also faced performance issues on android using MotiPressable in lists, moti skeleton also very slow. mainly when using moti, there are always lag in animations like opening bottom sheet, navigating to a next screen, removing moti completely, my app is very smooth now. i was using latest moti with last reanimated.

Thank you for sharing! If anyone has a minimal repro it would help identify the issues a lot

Hi! Thanks for this library!
Any plans to check performance issues in the near feature?

Hey I would really love to, I'm just slammed at the moment. Any help setting up an example in the repo showing a perf difference would help a lot

Also want to see if it's related to Reanimated memory leaks: https://github.com/nandorojo/moti/issues/322#issuecomment-2047484544

@TamasFarago Getting back from holiday so I'll put some code here of the previous and current code. This is not a minimal repro but showing the use case where the issue appeared for me. This is pseudo code now giving minimal example:
(worth to note I'm using twrnc: tailwind-react-native-classnames, for styling that you will see in the InputHeader component)

function Input(props) {
	const [focused, setFocused] = useState(false); // To control focus state of the input (border color + animations for the placeholder)

// react-hook-form controller
const {
		field,
		fieldState: { error },
	} = useController({
		control: props.control,
		defaultValue: "",
		name: props.name as string,
	});

return (
<InputContainer
    focused={focused}
    inputValue={field.value}
    item={item}
>
<TextInput
   {...item}
   // To change focused state
   onBlur={onBlur}
   onFocus={onFocus}
  value={field.value}
 />
</InputContainer>
)
}

function InpuntContainer(props) {
return (
  <View
   // Some universal styling for inputs
   style={}
>
{props.children}
{text ? (
	<InputHeader item={props.item} focused={props.focused} inputValue={props.inputValue} />
) : null}
</View>
)
}

/**
 * Header for input.
 * @description Displays text, required mark, explanation (for web)
 interface
 * @param {InputHeaderProps} props - The component props.
 */
export default function InputHeader({
	focused,
	inputValue,
	item,
}: InputHeaderProps) {
	const { animationDisabled, editable, info, required, text, webLogin } = item;

	/**
	 * Indicates whether the placeholder text should be animated up to the middle of the input top border.
	 */
	const shouldAnimatePlaceholder = useMemo(() => {
		if (
			(inputValue !== undefined && inputValue !== "" && inputValue !== null) ||
			inputValue === 0 ||
			focused
		) {
			return !animationDisabled;
		}
	}, [animationDisabled, focused, inputValue]);

	const phoneNumber = useMemo(() => item.name === "phoneNumber", []);

	const topPosition = useSharedValue(0);
	const topPositionAnimation = useAnimatedStyle(() => {
		return {
			top: withTiming(topPosition.value, {
				duration: 200,
				easing: Easing.inOut(Easing.quad),
			}),
		};
	}, []);

	const bgViewOpacity = useSharedValue(0);
	const bgViewOpacityAnimation = useAnimatedStyle(() => {
		return {
			opacity: withTiming(bgViewOpacity.value, {
				duration: 200,
				easing: Easing.inOut(Easing.quad),
			}),
		};
	}, []);

	const fontS = useSharedValue(web ? 12 : 15);
	const lineH = useSharedValue(17);
	const paddingLeft = useSharedValue(web ? 4 : 6);
	const fontAnimation = useAnimatedStyle(() => {
		return {
			fontSize: withTiming(fontS.value, {
				duration: 200,
				easing: Easing.inOut(Easing.quad),
			}),
			lineHeight: withTiming(lineH.value, {
				duration: 200,
				easing: Easing.inOut(Easing.quad),
			}),
			paddingLeft: withTiming(paddingLeft.value, {
				duration: 200,
				easing: Easing.inOut(Easing.quad),
			}),
		};
	}, []);

	useEffect(() => {
		if (!shouldAnimatePlaceholder) {
			if (web) {
				fontS.value = 12;
				lineH.value = 18;
			} else {
				fontS.value = 15;
				lineH.value = 17;
			}

			topPosition.value = 0;
			bgViewOpacity.value = 0;
			paddingLeft.value = web ? 4 : 6;
		} else {
			if (web) {
				if (info || webLogin) {
					topPosition.value = -17;
				} else {
					topPosition.value = -16;
				}
				fontS.value = 12;
				lineH.value = 18;
			} else {
				if (info) {
					topPosition.value = -13;
				} else {
					topPosition.value = -20;
					fontS.value = 14;
					lineH.value = 14;
				}
			}

			bgViewOpacity.value = 1;
			paddingLeft.value = web ? 10 : 14;
		}
	}, [shouldAnimatePlaceholder]);

	return (
		<Animated.View
			style={[
				{
					position: "absolute",
					left: 8,
					height: "100%",
					flexDirection: "row",
					alignItems: "center",
					justifyContent: "flex-start",
					overflow: "hidden",
					zIndex: -2,
				},
				topPositionAnimation,
			]}
		>
			<View
				style={tw.style(
					`flex-row rounded-3xl pr-0.5 h-[${
						shouldAnimatePlaceholder ? 14 : 18
					}px]`,
					animationDisabled && (inputValue || focused) && "hidden",
					editable === false && !shouldAnimatePlaceholder && "bg-transparent",
				)}
			>
				<Animated.View
					style={[
						{
							position: "absolute",
							width: "100%",
							height: 2,
							backgroundColor: "white",
							top: web ? 10 : 6.5,
							left: 2,
						},
						bgViewOpacityAnimation,
					]}
				/>
				<Animated.Text
					style={[
						{
							fontFamily: "Lato-Bold",
							paddingRight: 4,
							color: tw.color("neutral-700"),
							height: 20,
						},
						fontAnimation,
					]}
				>
					{text}
				</Animated.Text>
				{required ? (
					<BaseText
						text={"*"}
						style={tw.style(
							"web:leading-6 leading-4 text-themeColor",
							editable === false &&
								!shouldAnimatePlaceholder &&
								"bg-transparent",
						)}
					/>
				) : null}
			</View>
		</Animated.View>
	);
}

// Under here is the old component that used MotiViews and Texts. Some animation values have changed since commenting this out but the performance issue should show

// /**
//  * Calculates the top position for the placeholder animation.
//  *
//  * @return {number} The calculated top position.
//  */
// const topPosition = useMemo(() => {
// 	if (!shouldAnimatePlaceholder) {
// 		if (tw.prefixMatch("web")) {
// 			boxHeight.value = 0;
// 			return 0;
// 		}
// 		boxHeight.value = 2;
// 		return 2;
// 	}

// 	if (web) {
// 		if (tw.prefixMatch("web:lg") || info) {
// 			boxHeight.value = -17;
// 			return -17;
// 		}

// 		boxHeight.value = -24;
// 		return -24;
// 	}

// 	if (info) {
// 		boxHeight.value = -11;
// 		return -11;
// 	}

// 	boxHeight.value = -24;
// 	return -24;
// }, [shouldAnimatePlaceholder]);

// const fontSize = useMemo(() => {
// 	if (shouldAnimatePlaceholder) {
// 		if (web) {
// 			fontS.value = 12;
// 			return 12;
// 		}
// 		fontS.value = 14;
// 		return 14;
// 	}

// 	if (web) {
// 		fontS.value = 13;
// 		return 13;
// 	}
// 	fontS.value = 17;
// 	return 17;
// }, [shouldAnimatePlaceholder]);

// const lineHeight = useMemo(() => {
// 	if (web) {
// 		lineH.value = 18;
// 		return 18;
// 	}

// 	if (shouldAnimatePlaceholder) {
// 		lineH.value = 14;
// 		return 14;
// 	}

// 	lineH.value = 17;
// 	return 17;
// }, [shouldAnimatePlaceholder]);

// const test = useMemo(() => {
// 	if (shouldAnimatePlaceholder) {
// 		padding.value = 10;
// 		return 10;
// 	}

// 	lineH.value = 2;
// 	return 2;
// }, [shouldAnimatePlaceholder]);

// return (
// 	<MotiView
// animate={{ top: topPosition }}
// transition={{ type: "timing", duration: 200 }}
// style={tw.style(
// 	"absolute left-2 h-full flex-row items-center justify-start overflow-hidden",
// 	{ top: topPosition },
// 	info && "h-6",
// 	!web ? "left-3 max-w-input" : "xs:max-w-[86%]",
// 	phoneNumber && "left-26 web:left-21",
// 	{ zIndex: -2 },
// )}
// 	>
// 		<View
// 			style={tw.style(
// 				`flex-row rounded-3xl pr-0.5 h-[${
// 					shouldAnimatePlaceholder ? 14 : 18
// 				}px]`,
// 				animationDisabled && (inputValue || focused) && "hidden",
// 				editable === false && !shouldAnimatePlaceholder && "bg-transparent",
// 			)}
// 		>
// 			{/* <MotiView
// 				animate={{ opacity: shouldAnimatePlaceholder ? 1 : 0 }}
// 				style={tw.style(
// 					"absolute w-full h-[1.5px] bg-white top-[11px] web:top-[11px] left-0.5",
// 					webLogin && "top-2",
// 					{ opacity: shouldAnimatePlaceholder ? 1 : 0 },
// 				)}
// 			/> */}
// 			{/* <MotiText
// 				accessibilityLabel="input placeholder"
// 				animate={{
// 					// @ts-expect-error style property not recognized
// 					fontSize,
// 					paddingLeft: shouldAnimatePlaceholder ? 10 : 2,
// 					lineHeight,
// 					// fontFamily: test ? "Lato-Italic" : Lato-Regular,
// 				}}
// 				transition={{ type: "timing", duration: 200 }}
// 				style={tw.style(
// 					// { fontFamily: "Lato-Bold", fontSize, lineHeight, paddingLeft: 10 },
// 					// { fontFamily: "Lato-Black" },
// 					"pr-1 text-neutral-700 h-5",
// 					editable === false && !shouldAnimatePlaceholder && "bg-transparent",
// 				)}
// 			>
// 				{text}
// 			</MotiText> */}
// 			{required ? (
// 				<BaseText
// 					text={"*"}
// 					style={tw.style(
// 						"web:leading-6 leading-4 text-themeColor",
// 						editable === false &&
// 							!shouldAnimatePlaceholder &&
// 							"bg-transparent",
// 					)}
// 				/>
// 			) : null}
// 		</View>
// 	</MotiView>
// );

Skeletons are really heavy and causing performance issues as well for me.

So far it's been pretty much a few anecdotes of someone mentioning an issue in a massive list so I want to narrow it down to an example if possible

When navigating to a list with only 10+ skeletons is causing a little lag. If I place for example 50+ skeletons It hangs for couple of seconds before navigating to the list screen with skeletons.

@faljabi thanks for the update. Is this Android only? And are you using flashlist?

For both iOS and Android. Android is even a bit slower.
Yes I am using shopify Flashlist

hi, same issue here for v 0.29.0, I'm currently using it in my app flatlist.
In some Android devices the app just got hang, it looks like a memory leak.
Had to disable the skeleton before publishing my app, we are trying to make a workaround.

Will this be solved?

Sighs, I just spent hours, trying to figure out why bottomSheet render was really slow. sighs

Hey @nandorojo, first of all thank you for this amazing lib,  it's works pretty good but whenever I use multiple skeleton then it seems it takes time to render as it when I try switching from one screen to the other screen that contains some skeleton then I face lags. Can you please help with this issue

I ran into the same issue when moving my app from expo sdk 49 to 52. Everything suddenly became very slow. the app became unusable. I just had to remove moti, and the perfomance improved.

Reanimated must have had some sort of regression in that time period, likely due to using external functions the way moti does

Just to give everyone an update: I would love to have this solved and would totally merge a PR if anyone can identify it, I just haven't had the time to get to it.
If you want to take this on, I'm happy to give you pointers. Mainly: spin up the example app in this repo, and edit useMotify, maybe commenting things out and then back in until you can isolate the performance issue. Even if you at least can do that I can probably take it from there.
Again, sorry for any issues you've faced in your apps, and thanks for reporting here. Given that the change happens when upgrading Expo (and thus Reanimated), it means that the problem originates outside of Moti. That said, there is likely a change moti can make to improve it.
My hunch is that it's related to having a worklet defined outside of useAnimatedStyle or something like that. Or perhaps one of the for...loops. Reanimated's worklets can be a bit of a moving target for things like that, and I've found that it can be a tiny change sometimes.


New line not working

Hello
I'm trying to post an image with a caption including new line ( \r\n )
But it doesn't work and new line does not appear correctly.
Please help
Thanks

"new line" effect is not seen in any place.
some places works, other don't. (I' do not remember where I could see)


How to use rspec + spring?

I'm trying to utilize spring to boost start time of rspec
Current my launch.json:
{
    "version": "0.2.0",
    "configurations": [
        {
            "type": "rdbg",
            "rdbgPath": "bundle exec rdbg",
            "name": "Run rspec",
            "useBundler": true,
            "useTerminal": true,
            "request": "launch",
            "command": "rspec",
            "script": "${file}:${lineNumber}",
            "args": [],
            "askParameters": false,
        }
    ]
}

If I update  "command": "rspec" to  "command": "spring rspec" it starts faster, but debugging doesn't work. It doesn't catch up on break points
Ideas?

When you do that the debugger get's attached to the spring process. You can "Pause" the debugger and you will see that your are indeed attached to the spring process and not your test.
Your test will keep running until it reaches the end even if the attached process execution is stopped.
It looks like the socket gets created by spring and not RSpec thus the attach to Spring.
A piece of information: I did the test as I was curious if more that one socket was created, for instance one for RSpec and one for Spring. It appears only one socket is created when running RSpec in this manner.


Use time zones in modification and creation date

for now it just prints +0 time always

Since https://github.com/qarmin/szyszka/commit/f387a69b8756384670e4d91ebedd03971fa4a876 uses current timezone.
It will print wrong time when file was created in summer/winter time


many compile errors after npm install

I followed the instructions given in issue #1109 and was able to make the deps.js file for closure-library. I tested that it works when running uncompiled code.  However, I just tried to compile some code and got 89 errors, all pretty much the same.
[14:46:40 ~/Documents/Programming/myphysicslab]$ make doublespring
Current settings:
COMPILE_LEVEL = simple
BUILD_DIR = build
LOCALE = en
UTIL_DEBUG = false
GOOG_DEBUG = false
./compile_js.sh src/sims/springs/DoubleSpringApp.js build/sims/springs/DoubleSpringApp-en.js false false simple
erikn's .bashrc is running
--output_wrapper=/*Copyright_2020_Erik_Neumann_All_Rights_Reserved_www.myphysicslab.com*/%output%
++ date '+%F %T'
+ java -jar ../compiler-latest/closure-compiler-v20210106.jar --entry_point=goog:myphysicslab.sims.springs.DoubleSpringApp --compilation_level=SIMPLE --define=goog.DEBUG=false '--define=goog.LOCALE='\''en'\''' '--define=module$exports$myphysicslab$lab$util$Util.ADVANCED=false' '--define=module$exports$myphysicslab$lab$util$Util.DEBUG=false' '--define=module$exports$myphysicslab$lab$util$Util.COMPILE_TIME=2021-01-25 14:46:45' --generate_exports --js=../closure-library/ --js=src --jscomp_error=accessControls --jscomp_error=checkTypes --jscomp_error=checkVars --jscomp_error=const --jscomp_error=constantProperty --jscomp_error=globalThis --jscomp_error=invalidCasts --jscomp_error=misplacedTypeAnnotation --jscomp_error=missingProperties --jscomp_error=missingProvide --jscomp_error=missingRequire --jscomp_error=missingReturn --jscomp_error=strictModuleDepCheck --jscomp_error=suspiciousCode --jscomp_error=typeInvalidation --jscomp_error=undefinedNames --jscomp_error=undefinedVars --jscomp_error=unknownDefines --jscomp_error=uselessCode --jscomp_error=visibility --hide_warnings_for=../closure-library/ --conformance_configs=/Users/erikn/Documents/Programming/myphysicslab/conformance_config.textproto --emit_use_strict --language_in=ECMASCRIPT_2017 --language_out=ECMASCRIPT_2017 --dependency_mode=PRUNE --warning_level=VERBOSE '--output_wrapper=/*Copyright_2020_Erik_Neumann_All_Rights_Reserved_www.myphysicslab.com*/%output%'
../closure-library/node_modules/google-closure-library/closure/goog/array/array.js:12:0: ERROR -
[JSC_DUPLICATE_MODULE] Duplicate module: goog.array. Module already declared in other file ../closure-library/closure/goog/array/array.js
  12| goog.module('goog.array');
      ^^^^^^^^^^^^^^^^^^^^^^^^^

../closure-library/node_modules/google-closure-library/closure/goog/asserts/asserts.js:39:0: ERROR -
[JSC_DUPLICATE_NAMESPACE] Duplicate namespace: goog.asserts. Namespace already provided in other file ../closure-library/closure/goog/asserts/asserts.js
  39| goog.provide('goog.asserts');
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

../closure-library/node_modules/google-closure-library/closure/goog/asserts/asserts.js:40:0: ERROR -
[JSC_DUPLICATE_NAMESPACE] Duplicate namespace: goog.asserts.AssertionError. Namespace already provided in other file ../closure-library/closure/goog/asserts/asserts.js
  40| goog.provide('goog.asserts.AssertionError');
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

[... more errors ...]

../closure-library/node_modules/google-closure-library/closure/goog/style/style.js:15:0: ERROR -
[JSC_DUPLICATE_NAMESPACE] Duplicate namespace: goog.style. Namespace already provided in other file ../closure-library/closure/goog/style/style.js
  15| goog.provide('goog.style');
      ^^^^^^^^^^^^^^^^^^^^^^^^^^

../closure-library/node_modules/google-closure-library/closure/goog/useragent/useragent.js:15:0: ERROR -
[JSC_DUPLICATE_NAMESPACE] Duplicate namespace: goog.userAgent. Namespace already provided in other file ../closure-library/closure/goog/useragent/useragent.js
  15| goog.provide('goog.userAgent');
      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

89 error(s), 0 warning(s)
+ result=89
+ set +x
make: *** [build/sims/springs/DoubleSpringApp-en.js] Error 1
make: *** Deleting file `build/sims/springs/DoubleSpringApp-en.js'

This is my first time using node or npm. Am I not understanding something about how to use npm?

Can you provide more information about how you used to consume Closure Library? It looks like you might have provided the library twice to the compiler, potentially once within ~/Documents/Programming/closure-library and once elsewhere?
../closure-library/node_modules/google-closure-library/ is also confusing as that to me implies that somehow you ran npm install google-closure-library while within the closure-library folder and somehow NPM allows that (it errors when I try it).

Can you provide more information about how you used to consume Closure Library? It looks like you might have provided the library twice to the compiler, potentially once within ~/Documents/Programming/closure-library and once elsewhere?
../closure-library/node_modules/google-closure-library/ is also confusing as that to me implies that somehow you ran npm install google-closure-library while within the closure-library folder and somehow NPM allows that (it errors when I try it).

(reposting from the right account... sorry!)
Can you provide more information about how you used to consume Closure Library? It looks like you might have provided the library twice to the compiler, potentially once within ~/Documents/Programming/closure-library and once elsewhere?
../closure-library/node_modules/google-closure-library/ is also confusing as that to me implies that somehow you ran npm install google-closure-library while within the closure-library folder and somehow NPM allows that (it errors when I try it).

(reposting from the right account... sorry!)
Can you provide more information about how you used to consume Closure Library? It looks like you might have provided the library twice to the compiler, potentially once within ~/Documents/Programming/closure-library and once elsewhere?
../closure-library/node_modules/google-closure-library/ is also confusing as that to me implies that somehow you ran npm install google-closure-library while within the closure-library folder and somehow NPM allows that (it errors when I try it).

Hello, I did not understand what you are talking about. I am working on the
command line. Can you explain it more?
في الثلاثاء، ٢٦ يناير، ٢٠٢١ ٢:٠٦ ص Erik Neumann<EMAIL_ADDRESS>كتب:

I followed the instructions given in issue #1109
https://github.com/google/closure-library/issues/1109 and was able to
make the deps.js file for closure-library. I tested that it works when
running uncompiled code. However, I just tried to compile some code and got
89 errors, all pretty much the same.
[14:46:40 ~/Documents/Programming/myphysicslab]$ make doublespring
Current settings:
COMPILE_LEVEL = simple
BUILD_DIR = build
LOCALE = en
UTIL_DEBUG = false
GOOG_DEBUG = false
./compile_js.sh src/sims/springs/DoubleSpringApp.js build/sims/springs/DoubleSpringApp-en.js false false simple
erikn's .bashrc is running
--output_wrapper=/Copyright_2020_Erik_Neumann_All_Rights_Reserved_www.myphysicslab.com/%output%
++ date '+%F %T'

java -jar ../compiler-latest/closure-compiler-v20210106.jar --entry_point=goog:myphysicslab.sims.springs.DoubleSpringApp --compilation_level=SIMPLE --define=goog.DEBUG=false '--define=goog.LOCALE='''en'''' '--define=module$exports$myphysicslab$lab$util$Util.ADVANCED=false' '--define=module$exports$myphysicslab$lab$util$Util.DEBUG=false' '--define=module$exports$myphysicslab$lab$util$Util.COMPILE_TIME=2021-01-25 14:46:45' --generate_exports --js=../closure-library/ --js=src --jscomp_error=accessControls --jscomp_error=checkTypes --jscomp_error=checkVars --jscomp_error=const --jscomp_error=constantProperty --jscomp_error=globalThis --jscomp_error=invalidCasts --jscomp_error=misplacedTypeAnnotation --jscomp_error=missingProperties --jscomp_error=missingProvide --jscomp_error=missingRequire --jscomp_error=missingReturn --jscomp_error=strictModuleDepCheck --jscomp_error=suspiciousCode --jscomp_error=typeInvalidation --jscomp_error=undefinedNames --jscomp_error=undefinedVars --jscomp_error=unknownDefines --jscomp_error=uselessCode --jscomp_error=visibility --hide_warnings_for=../closure-library/ --conformance_configs=/Users/erikn/Documents/Programming/myphysicslab/conformance_config.textproto --emit_use_strict --language_in=ECMASCRIPT_2017 --language_out=ECMASCRIPT_2017 --dependency_mode=PRUNE --warning_level=VERBOSE '--output_wrapper=/Copyright_2020_Erik_Neumann_All_Rights_Reserved_www.myphysicslab.com/%output%'
../closure-library/node_modules/google-closure-library/closure/goog/array/array.js:12:0: ERROR - [JSC_DUPLICATE_MODULE] Duplicate module: goog.array. Module already declared in other file ../closure-library/closure/goog/array/array.js
12| goog.module('goog.array');
^^^^^^^^^^^^^^^^^^^^^^^^^

../closure-library/node_modules/google-closure-library/closure/goog/asserts/asserts.js:39:0: ERROR - [JSC_DUPLICATE_NAMESPACE] Duplicate namespace: goog.asserts. Namespace already provided in other file ../closure-library/closure/goog/asserts/asserts.js
39| goog.provide('goog.asserts');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../closure-library/node_modules/google-closure-library/closure/goog/asserts/asserts.js:40:0: ERROR - [JSC_DUPLICATE_NAMESPACE] Duplicate namespace: goog.asserts.AssertionError. Namespace already provided in other file ../closure-library/closure/goog/asserts/asserts.js
40| goog.provide('goog.asserts.AssertionError');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[... more errors ...]
../closure-library/node_modules/google-closure-library/closure/goog/style/style.js:15:0: ERROR - [JSC_DUPLICATE_NAMESPACE] Duplicate namespace: goog.style. Namespace already provided in other file ../closure-library/closure/goog/style/style.js
15| goog.provide('goog.style');
^^^^^^^^^^^^^^^^^^^^^^^^^^
../closure-library/node_modules/google-closure-library/closure/goog/useragent/useragent.js:15:0: ERROR - [JSC_DUPLICATE_NAMESPACE] Duplicate namespace: goog.userAgent. Namespace already provided in other file ../closure-library/closure/goog/useragent/useragent.js
15| goog.provide('goog.userAgent');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
89 error(s), 0 warning(s)

result=89
set +x
make: *** [build/sims/springs/DoubleSpringApp-en.js] Error 1
make: *** Deleting file `build/sims/springs/DoubleSpringApp-en.js'

This is my first time using node or npm. Am I not understanding something
about how to use npm?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/google/closure-library/issues/1111, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AR7VVY7DIXQAPPZTTYDLT3DS3X2NZANCNFSM4WSQBLRQ
.

Hello, I did not understand what you are talking about. I am working on the
command line. Can you explain it more?
في الثلاثاء، ٢٦ يناير، ٢٠٢١ ٢:٠٦ ص Erik Neumann<EMAIL_ADDRESS>كتب:

I followed the instructions given in issue #1109
https://github.com/google/closure-library/issues/1109 and was able to
make the deps.js file for closure-library. I tested that it works when
running uncompiled code. However, I just tried to compile some code and got
89 errors, all pretty much the same.
[14:46:40 ~/Documents/Programming/myphysicslab]$ make doublespring
Current settings:
COMPILE_LEVEL = simple
BUILD_DIR = build
LOCALE = en
UTIL_DEBUG = false
GOOG_DEBUG = false
./compile_js.sh src/sims/springs/DoubleSpringApp.js build/sims/springs/DoubleSpringApp-en.js false false simple
erikn's .bashrc is running
--output_wrapper=/Copyright_2020_Erik_Neumann_All_Rights_Reserved_www.myphysicslab.com/%output%
++ date '+%F %T'

java -jar ../compiler-latest/closure-compiler-v20210106.jar --entry_point=goog:myphysicslab.sims.springs.DoubleSpringApp --compilation_level=SIMPLE --define=goog.DEBUG=false '--define=goog.LOCALE='''en'''' '--define=module$exports$myphysicslab$lab$util$Util.ADVANCED=false' '--define=module$exports$myphysicslab$lab$util$Util.DEBUG=false' '--define=module$exports$myphysicslab$lab$util$Util.COMPILE_TIME=2021-01-25 14:46:45' --generate_exports --js=../closure-library/ --js=src --jscomp_error=accessControls --jscomp_error=checkTypes --jscomp_error=checkVars --jscomp_error=const --jscomp_error=constantProperty --jscomp_error=globalThis --jscomp_error=invalidCasts --jscomp_error=misplacedTypeAnnotation --jscomp_error=missingProperties --jscomp_error=missingProvide --jscomp_error=missingRequire --jscomp_error=missingReturn --jscomp_error=strictModuleDepCheck --jscomp_error=suspiciousCode --jscomp_error=typeInvalidation --jscomp_error=undefinedNames --jscomp_error=undefinedVars --jscomp_error=unknownDefines --jscomp_error=uselessCode --jscomp_error=visibility --hide_warnings_for=../closure-library/ --conformance_configs=/Users/erikn/Documents/Programming/myphysicslab/conformance_config.textproto --emit_use_strict --language_in=ECMASCRIPT_2017 --language_out=ECMASCRIPT_2017 --dependency_mode=PRUNE --warning_level=VERBOSE '--output_wrapper=/Copyright_2020_Erik_Neumann_All_Rights_Reserved_www.myphysicslab.com/%output%'
../closure-library/node_modules/google-closure-library/closure/goog/array/array.js:12:0: ERROR - [JSC_DUPLICATE_MODULE] Duplicate module: goog.array. Module already declared in other file ../closure-library/closure/goog/array/array.js
12| goog.module('goog.array');
^^^^^^^^^^^^^^^^^^^^^^^^^

../closure-library/node_modules/google-closure-library/closure/goog/asserts/asserts.js:39:0: ERROR - [JSC_DUPLICATE_NAMESPACE] Duplicate namespace: goog.asserts. Namespace already provided in other file ../closure-library/closure/goog/asserts/asserts.js
39| goog.provide('goog.asserts');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
../closure-library/node_modules/google-closure-library/closure/goog/asserts/asserts.js:40:0: ERROR - [JSC_DUPLICATE_NAMESPACE] Duplicate namespace: goog.asserts.AssertionError. Namespace already provided in other file ../closure-library/closure/goog/asserts/asserts.js
40| goog.provide('goog.asserts.AssertionError');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
[... more errors ...]
../closure-library/node_modules/google-closure-library/closure/goog/style/style.js:15:0: ERROR - [JSC_DUPLICATE_NAMESPACE] Duplicate namespace: goog.style. Namespace already provided in other file ../closure-library/closure/goog/style/style.js
15| goog.provide('goog.style');
^^^^^^^^^^^^^^^^^^^^^^^^^^
../closure-library/node_modules/google-closure-library/closure/goog/useragent/useragent.js:15:0: ERROR - [JSC_DUPLICATE_NAMESPACE] Duplicate namespace: goog.userAgent. Namespace already provided in other file ../closure-library/closure/goog/useragent/useragent.js
15| goog.provide('goog.userAgent');
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
89 error(s), 0 warning(s)

result=89
set +x
make: *** [build/sims/springs/DoubleSpringApp-en.js] Error 1
make: *** Deleting file `build/sims/springs/DoubleSpringApp-en.js'

This is my first time using node or npm. Am I not understanding something
about how to use npm?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
https://github.com/google/closure-library/issues/1111, or unsubscribe
https://github.com/notifications/unsubscribe-auth/AR7VVY7DIXQAPPZTTYDLT3DS3X2NZANCNFSM4WSQBLRQ
.

../closure-library/node_modules/google-closure-library/ is also confusing as that to me implies that somehow you ran npm install google-closure-library while within the closure-library folder and somehow NPM allows that (it errors when I try it).

I did run npm install from within closure-library directory, that was my understanding of what to do from issue #1109.  And it does generate the deps.js file, and I was able to successfully run from uncompiled source code.  But now I can't compile (which is what I need to do 99.9% of the time).

Can you provide more information about how you used to consume Closure Library? It looks like you might have provided the library twice to the compiler, potentially once within ~/Documents/Programming/closure-library and once elsewhere?

I have a symbolic link to closure-library within my project directory.  AFAIK I'm providing closure-library just once with --js=../closure-library/.  I haven't changed anything in my project about how I'm using closure-library, the only difference is that I ran that npm install command over in closure-library, which creates a directory closure-library/node_modules/ with lots of stuff in it, including closure-library/node_modules/google-closure-library/.  Perhaps that's the problem? Something is finding both the node_modules/google-closure-library version and the regular version at closure-library/closure/goog/ ?  As I said, I'm totally new at using node/npm, so I'm just following instructions given in issue #1109
Within my project a typical file might start like this, which shows how I'm accessing closure-library within my code.
goog.module('myphysicslab.lab.engine2D.Polygon');

const array = goog.require('goog.array');
const asserts = goog.require('goog.asserts');

Here is the same compile command as shown earlier, but line wrapped to make it easier to read:
+ java -jar ../compiler-latest/closure-compiler-v20210106.jar
--entry_point=goog:myphysicslab.sims.springs.DoubleSpringApp --compilation_level=SIMPLE
--define=goog.DEBUG=false '--define=goog.LOCALE='\''en'\'''
'--define=module$exports$myphysicslab$lab$util$Util.ADVANCED=false'
'--define=module$exports$myphysicslab$lab$util$Util.DEBUG=false'
'--define=module$exports$myphysicslab$lab$util$Util.COMPILE_TIME=2021-01-25 14:46:45'
--generate_exports --js=../closure-library/ --js=src --jscomp_error=accessControls
--jscomp_error=checkTypes --jscomp_error=checkVars --jscomp_error=const
--jscomp_error=constantProperty --jscomp_error=globalThis --jscomp_error=invalidCasts
--jscomp_error=misplacedTypeAnnotation --jscomp_error=missingProperties
--jscomp_error=missingProvide --jscomp_error=missingRequire
--jscomp_error=missingReturn --jscomp_error=strictModuleDepCheck
--jscomp_error=suspiciousCode --jscomp_error=typeInvalidation
--jscomp_error=undefinedNames --jscomp_error=undefinedVars
--jscomp_error=unknownDefines --jscomp_error=uselessCode --jscomp_error=visibility
--hide_warnings_for=../closure-library/
--conformance_configs=/Users/erikn/Documents/Programming/myphysicslab/conformance_config
.textproto --emit_use_strict --language_in=ECMASCRIPT_2017
--language_out=ECMASCRIPT_2017 --dependency_mode=PRUNE --warning_level=VERBOSE
'--output_wrapper=/*Copyright_2020_Erik_Neumann_All_Rights_Reserved_www.myphysicslab.com
*/%output%'

../closure-library/node_modules/google-closure-library/ is also confusing as that to me implies that somehow you ran npm install google-closure-library while within the closure-library folder and somehow NPM allows that (it errors when I try it).

I did run npm install from within closure-library directory, that was my understanding of what to do from issue #1109.  And it does generate the deps.js file, and I was able to successfully run from uncompiled source code.  But now I can't compile (which is what I need to do 99.9% of the time).

Can you provide more information about how you used to consume Closure Library? It looks like you might have provided the library twice to the compiler, potentially once within ~/Documents/Programming/closure-library and once elsewhere?

I have a symbolic link to closure-library within my project directory.  AFAIK I'm providing closure-library just once with --js=../closure-library/.  I haven't changed anything in my project about how I'm using closure-library, the only difference is that I ran that npm install command over in closure-library, which creates a directory closure-library/node_modules/ with lots of stuff in it, including closure-library/node_modules/google-closure-library/.  Perhaps that's the problem? Something is finding both the node_modules/google-closure-library version and the regular version at closure-library/closure/goog/ ?  As I said, I'm totally new at using node/npm, so I'm just following instructions given in issue #1109
Within my project a typical file might start like this, which shows how I'm accessing closure-library within my code.
goog.module('myphysicslab.lab.engine2D.Polygon');

const array = goog.require('goog.array');
const asserts = goog.require('goog.asserts');

Here is the same compile command as shown earlier, but line wrapped to make it easier to read:
+ java -jar ../compiler-latest/closure-compiler-v20210106.jar
--entry_point=goog:myphysicslab.sims.springs.DoubleSpringApp --compilation_level=SIMPLE
--define=goog.DEBUG=false '--define=goog.LOCALE='\''en'\'''
'--define=module$exports$myphysicslab$lab$util$Util.ADVANCED=false'
'--define=module$exports$myphysicslab$lab$util$Util.DEBUG=false'
'--define=module$exports$myphysicslab$lab$util$Util.COMPILE_TIME=2021-01-25 14:46:45'
--generate_exports --js=../closure-library/ --js=src --jscomp_error=accessControls
--jscomp_error=checkTypes --jscomp_error=checkVars --jscomp_error=const
--jscomp_error=constantProperty --jscomp_error=globalThis --jscomp_error=invalidCasts
--jscomp_error=misplacedTypeAnnotation --jscomp_error=missingProperties
--jscomp_error=missingProvide --jscomp_error=missingRequire
--jscomp_error=missingReturn --jscomp_error=strictModuleDepCheck
--jscomp_error=suspiciousCode --jscomp_error=typeInvalidation
--jscomp_error=undefinedNames --jscomp_error=undefinedVars
--jscomp_error=unknownDefines --jscomp_error=uselessCode --jscomp_error=visibility
--hide_warnings_for=../closure-library/
--conformance_configs=/Users/erikn/Documents/Programming/myphysicslab/conformance_config
.textproto --emit_use_strict --language_in=ECMASCRIPT_2017
--language_out=ECMASCRIPT_2017 --dependency_mode=PRUNE --warning_level=VERBOSE
'--output_wrapper=/*Copyright_2020_Erik_Neumann_All_Rights_Reserved_www.myphysicslab.com
*/%output%'

There isn't, and as far as I can tell the only way this would happen is if you had run npm install google-closure-library (specifically that - npm install is a different though similar command and is the right thing to install).
What is closure-library-prob? I don't see a reference to that anywhere else in this issue...
If you want to depend on Closure Library via the NPM module, I think the high-level steps to do so are:

go to your project's folder: ~/Documents/Programming/myphysicslab
run npm install --save google-closure-library
in your build script, use the path to the node_modules version of Closure Library you just installed (so something like ./node_modules/google-closure-library) instead of referencing ~/Documents/closure-library (which I'd guess is a checked out version of the Closure Library git repository and isn't needed anymore if you are relying on the NPM release).

There isn't, and as far as I can tell the only way this would happen is if you had run npm install google-closure-library (specifically that - npm install is a different though similar command and is the right thing to install).
What is closure-library-prob? I don't see a reference to that anywhere else in this issue...
If you want to depend on Closure Library via the NPM module, I think the high-level steps to do so are:

go to your project's folder: ~/Documents/Programming/myphysicslab
run npm install --save google-closure-library
in your build script, use the path to the node_modules version of Closure Library you just installed (so something like ./node_modules/google-closure-library) instead of referencing ~/Documents/closure-library (which I'd guess is a checked out version of the Closure Library git repository and isn't needed anymore if you are relying on the NPM release).

Thanks for your response.  (The closure-library-prob was the version of closure-library that I had run npm install on... I was renaming versions of closure-library to figure out what was going on).
The idea of using NPM to get ("depend on") Closure Library is interesting, thanks for the tips on how to get started.  I'll read up on NPM.  It looks like I would still have access to the calcdeps.py, so I could create my own deps.js file and be able to run from uncompiled code when necessary for debugging.
FYI running npm install does create that second version of closure-library at closure-library/node_modules/google-closure-library/. Here is a session where I just downloaded a fresh copy of closure-library with git and then ran npm install.
[16:08:00 ~/Documents/Programming]$ git clone https://github.com/google/closure-library.git
Cloning into 'closure-library'...
remote: Enumerating objects: 45, done.
remote: Counting objects: 100% (45/45), done.
remote: Compressing objects: 100% (38/38), done.
remote: Total 175687 (delta 7), reused 21 (delta 6), pack-reused 175642
Receiving objects: 100% (175687/175687), 177.90 MiB | 20.17 MiB/s, done.
Resolving deltas: 100% (151671/151671), done.
[16:08:49 ~/Documents/Programming]$ ls closure-library/
AUTHORS                 browser_capabilities.js protractor_spec.js
CONTRIBUTING            closure                 sauce_browsers.json
LICENSE                 closure-deps            scripts
README.md               doc                     third_party
all_tests.html          package.json
alltests.js             protractor.conf.js
[16:08:59 ~/Documents/Programming]$ cd closure-library
[16:09:13 ~/Documents/Programming/closure-library]$ npm install
npm WARN deprecated<EMAIL_ADDRESS>this library is no longer supported
npm WARN deprecated<EMAIL_ADDRESS>to-iso-string has been deprecated, use @segment/to-iso-string instead.
npm WARN deprecated<EMAIL_ADDRESS>This package is unmaintained. Use @sinonjs/formatio instead
npm WARN deprecated<EMAIL_ADDRESS>This package has been deprecated in favour of @sinonjs/samsam
npm WARN deprecated<EMAIL_ADDRESS>Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated<EMAIL_ADDRESS>Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated<EMAIL_ADDRESS>Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated<EMAIL_ADDRESS>request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated<EMAIL_ADDRESS>Jade has been renamed to pug, please install the latest version of pug instead of jade

><EMAIL_ADDRESS>prepare
> npm run gen_deps_js

><EMAIL_ADDRESS>gen_deps_js
> node scripts/gen_deps_js > ./closure/goog/deps.js

added 285 packages, and audited 288 packages in 22s

25 packages are looking for funding
  run `npm fund` for details

10 vulnerabilities (5 low, 2 high, 3 critical)

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
[16:09:40 ~/Documents/Programming/closure-library]$ ls
AUTHORS                 browser_capabilities.js package.json
CONTRIBUTING            closure                 protractor.conf.js
LICENSE                 closure-deps            protractor_spec.js
README.md               doc                     sauce_browsers.json
all_tests.html          node_modules            scripts
alltests.js             package-lock.json       third_party
[16:09:44 ~/Documents/Programming/closure-library]$ ls node_modules/
@types                          jsbn
adm-zip                         json-schema
agent-base                      json-schema-traverse
ajv                             json-stringify-safe
ansi-regex                      jsprim
ansi-styles                     jszip
argparse                        lcid
array-filter                    lie
array-union                     locate-path
array-uniq                      lodash
arrify                          lolex
asap                            lru-cache
asn1                            map-age-cleaner
assert-plus                     mem
async                           mime
asynckit                        mime-db
available-typed-arrays          mime-types
aws-sign2                       mimic-fn
aws4                            minimatch
balanced-match                  minimist
basic-auth                      mkdirp
bcrypt-pbkdf                    mocha
blocking-proxy                  ms
brace-expansion                 nice-try
browserstack                    npm-run-path
call-bind                       number-is-nan
camelcase                       oauth-sign
caseless                        object-assign
chalk                           object-inspect
cliui                           object-keys
code-point-at                   object.assign
color-convert                   once
color-name                      opener
colors                          os-locale
combined-stream                 os-tmpdir
commander                       p-defer
concat-map                      p-finally
core-util-is                    p-is-promise
corser                          p-limit
cross-spawn                     p-locate
dashdash                        p-try
debug                           pako
decamelize                      parse5
define-properties               path-exists
del                             path-is-absolute
delayed-stream                  path-is-inside
diff                            path-key
ecc-jsbn                        performance-now
ecstatic                        pify
emoji-regex                     pinkie
end-of-stream                   pinkie-promise
es-abstract                     portfinder
es-to-primitive                 process-nextick-args
es6-promise                     promise
es6-promisify                   promises-aplus-tests
escape-string-regexp            protractor
eventemitter3                   psl
execa                           pump
exit                            punycode
extend                          q
extsprintf                      qs
fast-deep-equal                 readable-stream
fast-json-stable-stringify      request
find-up                         require-directory
follow-redirects                require-main-filename
foreach                         requires-port
forever-agent                   rimraf
form-data                       safe-buffer
formatio                        safer-buffer
fs.realpath                     samsam
function-bind                   saucelabs
generate_closure_unit_tests     sax
get-caller-file                 secure-compare
get-intrinsic                   selenium-webdriver
get-stream                      semver
getpass                         set-blocking
glob                            set-immediate-shim
globby                          shebang-command
google-closure-deps             shebang-regex
google-closure-library          sigmund
growl                           signal-exit
har-schema                      sinon
har-validator                   source-map
has                             source-map-support
has-ansi                        sprintf-js
has-symbols                     sshpk
he                              string-width
http-proxy                      string.prototype.trimend
http-server                     string.prototype.trimstart
http-signature                  string_decoder
https-proxy-agent               strip-ansi
immediate                       strip-eof
inflight                        supports-color
inherits                        tmp
ini                             to-iso-string
invert-kv                       tough-cookie
is-arguments                    tunnel-agent
is-callable                     tweetnacl
is-date-object                  underscore
is-fullwidth-code-point         union
is-generator-function           uri-js
is-negative-zero                url-join
is-path-cwd                     util
is-path-in-cwd                  util-deprecate
is-path-inside                  uuid
is-regex                        verror
is-stream                       webdriver-js-extender
is-symbol                       webdriver-manager
is-typed-array                  which
is-typedarray                   which-module
isarray                         which-typed-array
isexe                           wrap-ansi
isstream                        wrappy
jade                            xml2js
jasmine                         xmlbuilder
jasmine-core                    y18n
jasmine-diff                    yargs
jasminewd2                      yargs-parser
[16:09:51 ~/Documents/Programming/closure-library]$ ls node_modules/google-closure-library/
AUTHORS         LICENSE         closure         third_party
CONTRIBUTING    README.md       package.json
[16:10:21 ~/Documents/Programming/closure-library]$ ls node_modules/google-closure-library/closure
bin     goog
[16:13:18 ~/Documents/Programming/closure-library]$ ls node_modules/google-closure-library/closure/bin
build           calcdeps.py     labs            logos

Thanks for your response.  (The closure-library-prob was the version of closure-library that I had run npm install on... I was renaming versions of closure-library to figure out what was going on).
The idea of using NPM to get ("depend on") Closure Library is interesting, thanks for the tips on how to get started.  I'll read up on NPM.  It looks like I would still have access to the calcdeps.py, so I could create my own deps.js file and be able to run from uncompiled code when necessary for debugging.
FYI running npm install does create that second version of closure-library at closure-library/node_modules/google-closure-library/. Here is a session where I just downloaded a fresh copy of closure-library with git and then ran npm install.
[16:08:00 ~/Documents/Programming]$ git clone https://github.com/google/closure-library.git
Cloning into 'closure-library'...
remote: Enumerating objects: 45, done.
remote: Counting objects: 100% (45/45), done.
remote: Compressing objects: 100% (38/38), done.
remote: Total 175687 (delta 7), reused 21 (delta 6), pack-reused 175642
Receiving objects: 100% (175687/175687), 177.90 MiB | 20.17 MiB/s, done.
Resolving deltas: 100% (151671/151671), done.
[16:08:49 ~/Documents/Programming]$ ls closure-library/
AUTHORS                 browser_capabilities.js protractor_spec.js
CONTRIBUTING            closure                 sauce_browsers.json
LICENSE                 closure-deps            scripts
README.md               doc                     third_party
all_tests.html          package.json
alltests.js             protractor.conf.js
[16:08:59 ~/Documents/Programming]$ cd closure-library
[16:09:13 ~/Documents/Programming/closure-library]$ npm install
npm WARN deprecated<EMAIL_ADDRESS>this library is no longer supported
npm WARN deprecated<EMAIL_ADDRESS>to-iso-string has been deprecated, use @segment/to-iso-string instead.
npm WARN deprecated<EMAIL_ADDRESS>This package is unmaintained. Use @sinonjs/formatio instead
npm WARN deprecated<EMAIL_ADDRESS>This package has been deprecated in favour of @sinonjs/samsam
npm WARN deprecated<EMAIL_ADDRESS>Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm WARN deprecated<EMAIL_ADDRESS>Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated<EMAIL_ADDRESS>Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)
npm WARN deprecated<EMAIL_ADDRESS>request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated<EMAIL_ADDRESS>Jade has been renamed to pug, please install the latest version of pug instead of jade

><EMAIL_ADDRESS>prepare
> npm run gen_deps_js

><EMAIL_ADDRESS>gen_deps_js
> node scripts/gen_deps_js > ./closure/goog/deps.js

added 285 packages, and audited 288 packages in 22s

25 packages are looking for funding
  run `npm fund` for details

10 vulnerabilities (5 low, 2 high, 3 critical)

To address all issues (including breaking changes), run:
  npm audit fix --force

Run `npm audit` for details.
[16:09:40 ~/Documents/Programming/closure-library]$ ls
AUTHORS                 browser_capabilities.js package.json
CONTRIBUTING            closure                 protractor.conf.js
LICENSE                 closure-deps            protractor_spec.js
README.md               doc                     sauce_browsers.json
all_tests.html          node_modules            scripts
alltests.js             package-lock.json       third_party
[16:09:44 ~/Documents/Programming/closure-library]$ ls node_modules/
@types                          jsbn
adm-zip                         json-schema
agent-base                      json-schema-traverse
ajv                             json-stringify-safe
ansi-regex                      jsprim
ansi-styles                     jszip
argparse                        lcid
array-filter                    lie
array-union                     locate-path
array-uniq                      lodash
arrify                          lolex
asap                            lru-cache
asn1                            map-age-cleaner
assert-plus                     mem
async                           mime
asynckit                        mime-db
available-typed-arrays          mime-types
aws-sign2                       mimic-fn
aws4                            minimatch
balanced-match                  minimist
basic-auth                      mkdirp
bcrypt-pbkdf                    mocha
blocking-proxy                  ms
brace-expansion                 nice-try
browserstack                    npm-run-path
call-bind                       number-is-nan
camelcase                       oauth-sign
caseless                        object-assign
chalk                           object-inspect
cliui                           object-keys
code-point-at                   object.assign
color-convert                   once
color-name                      opener
colors                          os-locale
combined-stream                 os-tmpdir
commander                       p-defer
concat-map                      p-finally
core-util-is                    p-is-promise
corser                          p-limit
cross-spawn                     p-locate
dashdash                        p-try
debug                           pako
decamelize                      parse5
define-properties               path-exists
del                             path-is-absolute
delayed-stream                  path-is-inside
diff                            path-key
ecc-jsbn                        performance-now
ecstatic                        pify
emoji-regex                     pinkie
end-of-stream                   pinkie-promise
es-abstract                     portfinder
es-to-primitive                 process-nextick-args
es6-promise                     promise
es6-promisify                   promises-aplus-tests
escape-string-regexp            protractor
eventemitter3                   psl
execa                           pump
exit                            punycode
extend                          q
extsprintf                      qs
fast-deep-equal                 readable-stream
fast-json-stable-stringify      request
find-up                         require-directory
follow-redirects                require-main-filename
foreach                         requires-port
forever-agent                   rimraf
form-data                       safe-buffer
formatio                        safer-buffer
fs.realpath                     samsam
function-bind                   saucelabs
generate_closure_unit_tests     sax
get-caller-file                 secure-compare
get-intrinsic                   selenium-webdriver
get-stream                      semver
getpass                         set-blocking
glob                            set-immediate-shim
globby                          shebang-command
google-closure-deps             shebang-regex
google-closure-library          sigmund
growl                           signal-exit
har-schema                      sinon
har-validator                   source-map
has                             source-map-support
has-ansi                        sprintf-js
has-symbols                     sshpk
he                              string-width
http-proxy                      string.prototype.trimend
http-server                     string.prototype.trimstart
http-signature                  string_decoder
https-proxy-agent               strip-ansi
immediate                       strip-eof
inflight                        supports-color
inherits                        tmp
ini                             to-iso-string
invert-kv                       tough-cookie
is-arguments                    tunnel-agent
is-callable                     tweetnacl
is-date-object                  underscore
is-fullwidth-code-point         union
is-generator-function           uri-js
is-negative-zero                url-join
is-path-cwd                     util
is-path-in-cwd                  util-deprecate
is-path-inside                  uuid
is-regex                        verror
is-stream                       webdriver-js-extender
is-symbol                       webdriver-manager
is-typed-array                  which
is-typedarray                   which-module
isarray                         which-typed-array
isexe                           wrap-ansi
isstream                        wrappy
jade                            xml2js
jasmine                         xmlbuilder
jasmine-core                    y18n
jasmine-diff                    yargs
jasminewd2                      yargs-parser
[16:09:51 ~/Documents/Programming/closure-library]$ ls node_modules/google-closure-library/
AUTHORS         LICENSE         closure         third_party
CONTRIBUTING    README.md       package.json
[16:10:21 ~/Documents/Programming/closure-library]$ ls node_modules/google-closure-library/closure
bin     goog
[16:13:18 ~/Documents/Programming/closure-library]$ ls node_modules/google-closure-library/closure/bin
build           calcdeps.py     labs            logos

What version of NPM are you using? (npm --version)
We do list google-closure-library as a dev dependency for closure-deps here which is likely where that is coming from, though why this happens for you and not me is a mystery. Not entirely sure why we have it as a dev dependency anyways - I'll ask around and see if that is still needed / potentially problematic.
One last thing - the docs for npm install mention that an environment variable NODE_ENV can be used to change the behaviour of the install command - mine is unset, what is yours set to? echo $NODE_ENV.

What version of NPM are you using? (npm --version)
We do list google-closure-library as a dev dependency for closure-deps here which is likely where that is coming from, though why this happens for you and not me is a mystery. Not entirely sure why we have it as a dev dependency anyways - I'll ask around and see if that is still needed / potentially problematic.
One last thing - the docs for npm install mention that an environment variable NODE_ENV can be used to change the behaviour of the install command - mine is unset, what is yours set to? echo $NODE_ENV.

@kjin For visibility - I think there's something confusing going on here.

@kjin For visibility - I think there's something confusing going on here.

[23:48:03 ~/Documents/Programming/closure-library]$ npm -v
7.4.0
[23:48:08 ~/Documents/Programming/closure-library]$ node -v
v15.6.0
[23:48:11 ~/Documents/Programming/closure-library]$ nvm -v
0.37.2
[23:51:53 ~/Documents/Programming/closure-library]$ echo $NODE_ENV

[23:51:59 ~/Documents/Programming/closure-library]$ echo $NVM_DIR
/Users/erikn/.nvm

I'm using bash on Mac OS 10.15.7 Catalina.  The only thing that NVM did to my .bashrc was to define that NVM_DIR variable.

[23:48:03 ~/Documents/Programming/closure-library]$ npm -v
7.4.0
[23:48:08 ~/Documents/Programming/closure-library]$ node -v
v15.6.0
[23:48:11 ~/Documents/Programming/closure-library]$ nvm -v
0.37.2
[23:51:53 ~/Documents/Programming/closure-library]$ echo $NODE_ENV

[23:51:59 ~/Documents/Programming/closure-library]$ echo $NVM_DIR
/Users/erikn/.nvm

I'm using bash on Mac OS 10.15.7 Catalina.  The only thing that NVM did to my .bashrc was to define that NVM_DIR variable.

Hey - sorry for missing the ping! There is definitely something going on here -- it's probably true that Closure library is errneously installing itself as a dependency because of the new closure-deps dependency. This should be straightforward to fix by removing the devDependency in closure-deps on google-closure-library. I will try to get a fix in within the next day (I am bandwidth-limited at the moment).
Thanks @myphysicslab for bringing this to our attention, these are exactly the kinds of issues we need to iron out after the deps.js change.


Fix reading from memory on windows

Closes #198

Coverage: 73.736%. Remained the same when pulling f64f560bfcb32d5cf13cb15f4fe218e2e1993ecc on reading-from-memory-win into 4624d00ca549d9d67b0c53ae930fd8feaeeb3c41 on main.


font awesome in link text?

Is there any way to use font awesome in link text?
A-->|"fa:fa-envelope"| B
not working

Me too, it seems to be broken now

Or you can make custom CSS directly into your node and use usual HTML for that.
Currently not only I can use font awesome with that technique, but also embed images and even Angular 2 code into the nodes

@trichetriche Would it be possible to share how are dealing with inserting Angular 2 code into the nodes?
I am currently stuck with using click callback handlers assigned to the node in the markup and am not quite sure how to proceed.

Personally I created window functions and deleted them on component destruction. Works like a charm for me !

Pleas read https://mermaidjs.github.io/breakingChanges.html now you don't need mermaid CSS file any more.
Please read https://mermaidjs.github.io/faq.html How to specify custom CSS file?

Is this supposed to work? OP's example in the live editor doesn't:
graph LR
  A-->|"fa:fa-envelope"| B

Having the same problem.


fix: update ldflags for local-release

followup #2362

cc @michi-covalen @nathanjsweet

Any chance we could release a patch version as cilium version won't work on github releases ?
Thanks for the fix !

yeah we are doing patch releases for cilium/cilium this week. we'll cut a cilium-cli release after that 🚀🙏

Alright thanks :pray:

should this have a regression test?


When sketching, the hint message cannot be displayed.

When sketching, the hint message cannot be displayed.

:white_check_mark: Build Macad3D av.main.288 completed (commit https://github.com/Macad3D/Macad3D/commit/c2f93e1225 by @zhyifei)


feature: add IP logging to failed password login attempts

A clear and concise description of what you want the system to do.

"Password authentication failed. Please retry" error should also log the IP, not just the session_id/request_id, to allow software like Fail2Ban to work against brute force attackers.

"Password authentication failed. Please retry" error should also log the IP, not just the session_id/request_id, to allow software like Fail2Ban to work against brute force attackers.

@Connor22 , got it! Will add shortly.
Also, please watch https://github.com/greenpau/caddy-security/issues/19. It could be of interest to you.

@Connor22 , the changes are caddy-security v1.0.12. Please test.


feat(dev): Add config parse and generate support

Which issue does this PR close?
Inspired by https://github.com/apache/opendal/pull/5451 from @trim21 and @Zheaoli's suggestion.
Rationale for this change
Parse config from rust code so that other bindings can generate nice public API.
What changes are included in this PR?
The ASF parser for rust core services config.
Are there any user-facing changes?
No, dev only.

Also cc @trim21 to take a look. I left the python part empty for you.


Docs for get_lensing_kernel are wrong

Here it says
mag_bias (tuple of arrays, optional) – A tuple of arrays (z, s(z)) giving the magnification bias as a function of redshift. If None, s=0 will be assumed

But if mag_bias is None, it just means that there is no magnification.

This was incorrect!


Revert "test-bot: general cleanup."

Reverts Homebrew/homebrew-test-bot#148

==> git -C homebrew/homebrew-core checkout master -f
==> brew cleanup --prune=7
Error: undefined local variable or method `unchanged_dependencies' for #<Homebrew::Test:0x0000010187ca88>
Did you mean?  @unchanged_dependencies
               changed_dependencies
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-test-bot/cmd/brew-test-bot.rb:672:in `setup_formulae_deps_instances'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-test-bot/cmd/brew-test-bot.rb:860:in `formula'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-test-bot/cmd/brew-test-bot.rb:1240:in `block in run'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-test-bot/cmd/brew-test-bot.rb:1239:in `each'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-test-bot/cmd/brew-test-bot.rb:1239:in `run'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-test-bot/cmd/brew-test-bot.rb:1587:in `test_bot'
/usr/local/Homebrew/Library/Taps/homebrew/homebrew-test-bot/cmd/brew-test-bot.rb:1680:in `<top (required)>'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.3.3/lib/ruby/2.3.0/rubygems/core_ext/kernel_require.rb:55:in `require'
/usr/local/Homebrew/Library/Homebrew/utils.rb:20:in `require?'
/usr/local/Homebrew/Library/Homebrew/brew.rb:106:in `<main>'

https://jenkins.brew.sh/job/Homebrew Core Pull Requests/20527/version=el_capitan/console


Prettier README

May I suggest moving things around in the README to make things more appealing and API easier to navigate?
Here are some ideas:

reformat the header: add description & badges
change the copy for the overview section (add links to some articles?)
split the warnings into a separate section
add install section
prioritize API and examples
deprioritize roadmap and move to the bottom (I'd actually moved the roadmap into a separate file)

Something like this:

rxjs-web

Observables for the Browser API

This library aims to provide an observable based API, that wraps the web APIapi. This also includes experimental, non-standard, and not well-supported APIs. Polyfills need to be provided by the user of this library if necessary.
📦 Install
npm i rxjs-web

This library uses the Observable implementation of rxjs >= 6 and expects you already have that installed in your project.
⚠ A word of warning
The public API surface of this library can be affected by breaking changes within the experimental API used.
Additionally, the implementation of this library makes use of globalThis which breaks ie <= 11! There is no plan to add support for IE 11 in this library.
🔧 API Reference
General Hint: Usually Promises are eager. All the APIs provided by this library, that wraps native promise-based APIs, are lazy though. This design decision was made due to the general specification of Observables.
fromIntersectionObserver
⚠ experimental ✅ tested
MDN link
description
const example = fromIntersectionObserver();
// ...

fromMutationObserver
⚠ experimental 🔬 not well tested
MDN link
description
const example = fromMutationObserver();
// ...

Supported API Roadmap

API
Implemented
Tested
Experimental/not well supported

Bluetooth API

☑

Broadcast Channel API

dynamic import
☑

File and Directory Entries API

☑

Geolocation API
☑

Image Capture API

☑

IntersectionObserver
☑

☑

matchMedia
☑

MutationObserver
☑

Network Information API
☑

☑

PerformanceObserver
☑

☑

Push API

☑

Permission API
☑

☑

ResizeObserver
☑

☑

Sensor APIs
☑

☑

Vibration API

☑

Credits
This project is build upon the typescript library starter. Kudos to @alexjoverm and every contributor of this amazing project!
Many thanks also goes to Sascha Nuissl for creating this fantastic logo!

Wow that looks amazing. Please submit a PR with those changes. I would highly appreciate it


⚠ Samsung has degraded performance

In e54751a, Samsung (https://samsung.com) experienced degraded performance:

HTTP code: 200
Response time: 2707 ms

Resolved: Samsung performance has improved in 7ce6036.


Version 6.6.0-rc1 release

Changed

Added user-generated JWT assertion support via sendJWTTokenRequest.
Added support for version v2.1-<IP_ADDRESS> of the DocuSign ESignature API.
Updated the SDK release version.

Closing as RC2 will be released with the changes present in this PR on top of some extra changes


Add "unik describe-compiler" CLI

Currently user has to consult README to see how her
application must be configured (e.g. what config files
should look like) in order to run it with UniK.
Not any more!

CONFIGURATION FILES
------ /manifest.yaml ------
main_file: <relative-path-to-your-fat-jar>

that prints usage information to the console.

Hi @ilackarms, hi @gberginc, now that the refactoring is done, we can continue with describe-compiler functionality where we will later provide a list of available packages (for the OSv compiler).
I'd kindly ask for a review.

thanks for pushing this through so fast. code looks good to me. @gberginc, any comments?


Plan for RAML mocking support

Customer Request: BP
Email: RE: Azure API Center - technical feedback by Demir Akarsu

Assign to @sthirthala for scopes and priorities.


Wallet location should be an adjustable setting with a dialog at start on GUI wallet

It looks like the only way to set the datadir is to run the wallet GUI with the -datadir= flag. This is inconvenient. It should be an option with a dialog at first start to set the datadir with a sane default datadir.

+1


Add UpdateRole rpc and an expired flag to Invitations

Summary
The following PR:

adds an UpdateRole RPC method
adds an expired flag to the Invitations message

Related to: https://github.com/stacklok/epics/issues/212
Change Type
Mark the type of change your PR introduces:

[ ] Bug fix (resolves an issue without affecting existing features)
[x] Feature (adds new functionality without breaking changes)
[ ] Breaking change (may impact existing functionalities or require documentation updates)
[ ] Documentation (updates or additions to documentation)
[ ] Refactoring or test improvements (no bug fixes or new functionality)

Testing
Outline how the changes were tested, including steps to reproduce and any relevant configurations.
Attach screenshots if helpful.
Review Checklist:

[x] Reviewed my own code for quality and clarity.
[ ] Added comments to complex or tricky code sections.
[ ] Updated any affected documentation.
[ ] Included tests that validate the fix or feature.
[ ] Checked that related changes are merged.

coverage: 53.352% (-0.02%) from 53.367%
when pulling 945e6999787ac54fbd126b25eb8bae1bdebc4e21 on proto
into 5d1bd36a1142fd93dae6704cb9f42581842fb730 on main.

coverage: 53.362% (-0.005%) from 53.367%
when pulling 839902052ca2c924727fe6793ebec3b2863814d1 on proto
into 5d1bd36a1142fd93dae6704cb9f42581842fb730 on main.

coverage: 53.464% (+0.01%) from 53.454%
when pulling 6de0ef43a79a7ed1a5b8d3ec21c0544dd8c9ab2e on proto
into 266f0f45ba919e723851c4fd69b6a689c226660e on main.

coverage: 53.445% (-0.005%) from 53.45%
when pulling f38f862acbd8bd0d8b4e34fcf70b352d19133f18 on proto
into cd5d5b49db87560332fca4ba5cca7cf56280c281 on main.

coverage: 53.422% (+0.005%) from 53.417%
when pulling 5530d5130e941ca3e38eb2afa769278c86e78079 on proto
into 5d33ee68d2d65b7adf974276baed17045e613f2c on main.

coverage: 53.39% (-0.01%) from 53.4%
when pulling b14cf47f43b583d02b19d69d17d84b60fc14a8d2 on proto
into cd7a0f287107e947cd7088bce8972b5524bea3fb on main.

coverage: 53.39%. remained the same
when pulling db5cd0528f094d1924e613650f18f26f3cef7d8f on proto
into f0a5d42c326e35030e819bc98f1a5f148b8df198 on main.

coverage: 53.39% (-0.005%) from 53.395%
when pulling 5c285c106b60fea4002c6857fe2897a9c7da42dd on proto
into 20581f6d78b4a7207cd7ae9610f05ffaceb1bbd1 on main.


adapters shouldn't pass arbitrary options to esbuild

See https://github.com/sveltejs/kit/pull/4626#issuecomment-1100081511 for a previous discussion about this. Currently, adapter-cloudflare and adapter-cloudflare-workers both pass their own options to esbuild.
This is bad API design — it's brittle and leaky. Beyond that, I'm not convinced it's even necessary. The cases where people want to manipulate the build output in some way (shimming node built-ins, etc) are all cases where the manipulation should probably happen long before the adapter gets involved. Assuming we manage to pull off #3535, that will become important anyway.
This PR removes the options altogether. If people report issues, we could consider adding the options back, but with a different API (like { esbuild: {...} }, or exposing individual options like external the way we do for adapter-vercel, not that I'd expect that to make any sense in the Cloudflare context).
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:

[x] It's really useful if your PR references an issue where it is discussed ahead of time. In many cases, features are absent for a reason. For large changes, please create an RFC: https://github.com/sveltejs/rfcs
[x] This message body should clearly illustrate what problems it solves.
[ ] Ideally, include a test that fails without this PR but passes with it.

Tests

[ ] Run the tests with pnpm test and lint the project with pnpm lint and pnpm check

Changesets

[x] If your PR makes a change that should be noted in one or more packages' changelogs, generate a changeset by running pnpx changeset and following the prompts. All changesets should be patch until SvelteKit 1.0

fyi @pzuraq  also mentioned a need for external here https://github.com/sveltejs/kit/pull/4276#discussion_r850394263

this would definitely be a breaking change for us, however I am going to investigate an alternative approach that encapsulates my build requirements at the vite configuration level. after initial investigation im not 100% sure this is going to be possible.
ideally for myself, exposing a unified interface for all adapters that allows people to hook into the esbuild process is extremely useful for getting out of some many sticky jams to do with your target environment. my vote goes for the shape @Rich-Harris hinted at above, something like { esbuild: {...} }.
i will update here once ive been able to fully test if we can achieve what we need without this requirement

I would also strongly prefer the esbuild option for the time being. I think long term I agree that the builds should ideally be the same for every environment, that's the long term goal here and we're getting closer all the time as libraries adopt native crypto, modules, build processes, etc. But there are still edge cases that cause things to just fail and until the ecosystem has gotten a bit further along it would be best to have the option to customize builds somehow, IMO.

exposing a unified interface for all adapters that allows people to hook into the esbuild process is extremely useful

Many adapters don't use esbuild at all, and then you have things like adapter-vercel which will soon offer an option to choose between lambda (no esbuild required) and edge (esbuild required), initially on a per-deployment basis but eventually possibly on a per-route basis. So it's not clear to me that a unified interface is a realistic or desirable goal. This, to me, is more evidence that workarounds for troublesome libraries belong in the Vite config.
If someone can provide a repro of a problem that is currently solved via esbuild config passed to an adapter that couldn't be solved through Vite config, I'd love to take a look.

makes sense, just waiting on the pre-rendering fix to land before we migrate our apps to the Module Worker pattern

I just cut a new release

This could be related to the way adapter-cloudflare-workers calls ESBuild then, but in our usage many different options don't make it through from vite. external and define don't, for instance, make it into the final build, which is why we have to customize the options in the adapter.

after a few hours of messing around with custom rollup/vite plugins, i've been unable to get a complete solution for the stripe node package to work in adapter-cloudflare-workers without the ability to inject esbuild options into the adapter.
i got mostly there, resolving the node internal packages to browserify alternatives. however, it appears i'm hitting a similar issue to @pzuraq. no matter what i try, the define option provided to vite.esbuild.define in my svelte.config.js does not replace process.env references as i need it to. i went so far as to try a custom vite plugin which transforms the code, yet even the transformed code does not appear in the build output from a svelte-kit build, yet i know my code runs due to logs appearing during build.
i feel like i'm close, but i also feel like it's a set of magic incantations to get this to work through vite. you can see my attempts below.

vite plugin (shimming node built-ins) - as far as i can tell this works
import { resolve, join } from 'path';
import findWorkspaceRoot from 'find-yarn-workspace-root';

const root = findWorkspaceRoot(process.cwd());
const nm = join(root, 'node_modules');

export function stripePre() {
  return {
    name: 'vite-plugin-stripe-cloudflare-workers',
    enforce: 'pre',
    resolveId(importee, ...rest) {
      if (
        importee.startsWith('\0child_process')
        || importee.startsWith('\0http')
        || importee.startsWith('\0https')
      ) {
        return {
          id: resolve(nm, '@package/build-tools/stub.js'),
        };
      }

      if (importee.startsWith('\0buffer')) {
        return {
          id: resolve(nm, 'buffer/index.js'),
        };
      }

      if (importee.startsWith('\0crypto')) {
        return {
          id: resolve(nm, 'crypto-browserify/index.js'),
        };
      }

      if (importee.startsWith('\0events')) {
        return {
          id: resolve(nm, 'events/events.js'),
        };
      }

      if (importee.startsWith('\0path')) {
        return {
          id: resolve(nm, 'path-browserify/index.js'),
        };
      }

      if (importee.startsWith('\0stream')) {
        return {
          id: resolve(nm, 'stream-browserify/index.js'),
        };
      }

      if (importee.startsWith('\x00util')) {
        return {
          id: resolve(nm, 'util/util.js'),
        };
      }
    },
  };
}

vite plugin (overwriting references to process.env) - this is not showing up in output, however it _is_ run. this is simply an alternative trying to make `define`
export function stripePost() {
  return {
    name: 'vite-plugin-stripe-cloudflare-workers-post',
    enforce: 'post',
    transform(code, id) {
      let transformed = false;
      let output = code;
      if (output.includes('process.env.NODE_ENV')) {
        output = output.replaceAll('process.env.NODE_ENV', '"production"');
        transformed = true;
      }
      if (output.includes('process.env.NODE_DEBUG')) {
        output = output.replaceAll('process.env.NODE_DEBUG', 'false');
        transformed = true;
      }
      if (transformed) return { code: output, map: null };
    }
  }
}

i also still need to work out injection of globals, these are unfortunately globals required by stripe node dependencies, so i'm not sure how i would achieve that with using the hook.ts file in sveltekit.

@f5io — you might find this useful: https://github.com/cloudflare/wrangler2/pull/869


Access to KeyVault (permission fails) after initially working using Managed Identity (Jobs)

[x] bug report
[ ] documentation issue or request
[ ] regression (a behaviour that used to work and stopped in a new release)

This is for Azure Container jobs in a .net 8.0 c# Project
Issue description
After turning on managed Identity for the Container Job and using that Identity to give access to a given keyvault. The job can successfully access that keyvault on each of its runs, until a change is made to the job (such as new docker image is deployed or changes to scale rules)
From that point onwards that job will always fail on start-up until the identity is turned off and back on (to create a new one) and then readded to the keyvault permissions.
Steps to reproduce

Create a .NET 8.0 container job project which uses keyvault to load its secrets

var configuration = new ConfigurationBuilder()
    .SetBasePath(Directory.GetCurrentDirectory())
    .AddAzureKeyVault(
        new SecretClient(
            vaultUri: new Uri($"https://xxx.vault.azure.net/"),
            credential: new DefaultAzureCredential()),
        new KeyVaultSecretManager())
    .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
    .AddEnvironmentVariables()
    .AddUserSecrets<Program>()
    .Build();

Deploy to azure container jobs.
Enable managed identity for the job
Add identity to keyvault permissions
Run job to show it successfully working
Deploy new docker image using the AzureContainerApps@1 in Azure Devops Pipeline
Run job again and see it fails with the following errors

Attempt 5 failed: ManagedIdentityCredential authentication failed: [Managed Identity] Authentication unavailable. No response received from the managed identity endpoint.
See the troubleshooting guide for more information. https://aka.ms/azsdk/net/identity/managedidentitycredential/troubleshoot
Max retry attempts reached. Unable to build configuration.
Unhandled exception. Azure.Identity.AuthenticationFailedException: ManagedIdentityCredential authentication failed: [Managed Identity] Authentication unavailable. No response received from the managed identity endpoint.
See the troubleshooting guide for more information. https://aka.ms/azsdk/net/identity/managedidentitycredential/troubleshoot
---> MSAL.NetCore.<IP_ADDRESS>.MsalServiceException:
ErrorCode: managed_identity_request_failed
Microsoft.Identity.Client.MsalServiceException: [Managed Identity] Authentication unavailable. No response received from the managed identity endpoint.
at Microsoft.Identity.Client.ManagedIdentity.AbstractManagedIdentity.HandleResponseAsync(AcquireTokenForManagedIdentityParameters parameters, HttpResponse response, CancellationToken cancellationToken)
at Microsoft.Identity.Client.ManagedIdentity.AbstractManagedIdentity.AuthenticateAsync(AcquireTokenForManagedIdentityParameters parameters, CancellationToken cancellationToken)
at Microsoft.Identity.Client.Internal.Requests.ManagedIdentityAuthRequest.SendTokenRequestForManagedIdentityAsync(ILoggerAdapter logger, CancellationToken cancellationToken)
at Microsoft.Identity.Client.Internal.Requests.ManagedIdentityAuthRequest.GetAccessTokenAsync(CancellationToken cancellationToken, ILoggerAdapter logger)
at Microsoft.Identity.Client.Internal.Requests.ManagedIdentityAuthRequest.ExecuteAsync(CancellationToken cancellationToken)
at Microsoft.Identity.Client.Internal.Requests.RequestBase.<>c__DisplayClass11_1.<<RunAsync>b__1>d.MoveNext()
--- End of stack trace from previous location ---
at Microsoft.Identity.Client.Utils.StopwatchService.MeasureCodeBlockAsync(Func`1 codeBlock)
at Microsoft.Identity.Client.Internal.Requests.RequestBase.RunAsync(CancellationToken cancellationToken)
at Microsoft.Identity.Client.ApiConfig.Executors.ManagedIdentityExecutor.ExecuteAsync(AcquireTokenCommonParameters commonParameters, AcquireTokenForManagedIdentityParameters managedIdentityParameters, CancellationToken cancellationToken)
at Azure.Identity.MsalManagedIdentityClient.AcquireTokenForManagedIdentityAsyncCore(Boolean async, TokenRequestContext requestContext, CancellationToken cancellationToken)
at Azure.Core.Pipeline.TaskExtensions.EnsureCompleted[T](ValueTask`1 task)
at Azure.Identity.MsalManagedIdentityClient.AcquireTokenForManagedIdentity(TokenRequestContext requestContext, CancellationToken cancellationToken)
at Azure.Identity.ManagedIdentityClient.AuthenticateAsync(Boolean async, TokenRequestContext context, CancellationToken cancellationToken)
at Azure.Identity.ManagedIdentityCredential.GetTokenImplAsync(Boolean async, TokenRequestContext requestContext, CancellationToken cancellationToken)

StatusCode: 403
ResponseBody:
Headers:
--- End of inner exception stack trace ---
at Azure.Identity.CredentialDiagnosticScope.FailWrapAndThrow(Exception ex, String additionalMessage, Boolean isCredentialUnavailable)
at Azure.Identity.ManagedIdentityCredential.GetTokenImplAsync(Boolean async, TokenRequestContext requestContext, CancellationToken cancellationToken)
at Azure.Core.Pipeline.TaskExtensions.EnsureCompleted[T](ValueTask`1 task)
at Azure.Identity.ManagedIdentityCredential.GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken)
at Azure.Identity.DefaultAzureCredential.GetTokenFromSourcesAsync(TokenCredential[] sources, TokenRequestContext requestContext, Boolean async, CancellationToken cancellationToken)
at Azure.Identity.DefaultAzureCredential.GetTokenImplAsync(Boolean async, TokenRequestContext requestContext, CancellationToken cancellationToken)
at Azure.Identity.CredentialDiagnosticScope.FailWrapAndThrow(Exception ex, String additionalMessage, Boolean isCredentialUnavailable)
at Azure.Identity.DefaultAzureCredential.GetTokenImplAsync(Boolean async, TokenRequestContext requestContext, CancellationToken cancellationToken)
at Azure.Core.Pipeline.TaskExtensions.EnsureCompleted[T](ValueTask`1 task)
at Azure.Identity.DefaultAzureCredential.GetToken(TokenRequestContext requestContext, CancellationToken cancellationToken)

at Azure.Core.Pipeline.BearerTokenAuthenticationPolicy.AccessTokenCache.SetResultOnTcsFromCredentialAsync(TokenRequestContext context, TaskCompletionSource`1 targetTcs, Boolean async, CancellationToken cancellationToken)
at Azure.Core.Pipeline.BearerTokenAuthenticationPolicy.AccessTokenCache.GetAuthHeaderValueAsync(HttpMessage message, TokenRequestContext context, Boolean async)
at Azure.Core.Pipeline.TaskExtensions.EnsureCompleted[T](Task`1 task)
at Azure.Core.Pipeline.BearerTokenAuthenticationPolicy.AccessTokenCache.TokenRequestState.GetCurrentHeaderValue(Boolean async, Boolean checkForCompletion, CancellationToken cancellationToken)
at Azure.Core.Pipeline.BearerTokenAuthenticationPolicy.AccessTokenCache.GetAuthHeaderValueAsync(HttpMessage message, TokenRequestContext context, Boolean async)
at Azure.Core.Pipeline.TaskExtensions.EnsureCompleted[T](ValueTask`1 task)
at Azure.Core.Pipeline.BearerTokenAuthenticationPolicy.AuthenticateAndAuthorizeRequest(HttpMessage message, TokenRequestContext context)
at Azure.Security.KeyVault.ChallengeBasedAuthenticationPolicy.AuthorizeRequestInternal(HttpMessage message, Boolean async)
at Azure.Core.Pipeline.TaskExtensions.EnsureCompleted(ValueTask task)
at Azure.Security.KeyVault.ChallengeBasedAuthenticationPolicy.AuthorizeRequest(HttpMessage message)
at Azure.Security.KeyVault.ChallengeBasedAuthenticationPolicy.ProcessAsyncInternal(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)
at Azure.Core.Pipeline.TaskExtensions.EnsureCompleted(ValueTask task)
at Azure.Security.KeyVault.ChallengeBasedAuthenticationPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)

at Azure.Core.Pipeline.RedirectPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)
at Azure.Core.Pipeline.TaskExtensions.EnsureCompleted(ValueTask task)
at Azure.Core.Pipeline.RedirectPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)
at Azure.Core.Pipeline.RetryPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)
at Azure.Core.Pipeline.RetryPolicy.ProcessAsync(HttpMessage message, ReadOnlyMemory`1 pipeline, Boolean async)
at Azure.Core.Pipeline.TaskExtensions.EnsureCompleted(ValueTask task)
at Azure.Core.Pipeline.RetryPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)
at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)
at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
at Azure.Core.Pipeline.HttpPipelinePolicy.ProcessNext(HttpMessage message, ReadOnlyMemory`1 pipeline)
at Azure.Core.Pipeline.HttpPipelineSynchronousPolicy.Process(HttpMessage message, ReadOnlyMemory`1 pipeline)
at Azure.Core.Pipeline.HttpPipeline.Send(HttpMessage message, CancellationToken cancellationToken)

at Azure.Core.Pipeline.HttpPipeline.SendRequest(Request request, CancellationToken cancellationToken)
at Azure.Security.KeyVault.KeyVaultPipeline.SendRequest(Request request, CancellationToken cancellationToken)
at Azure.Security.KeyVault.KeyVaultPipeline.GetPage[T](Uri firstPageUri, String nextLink, Func`1 itemFactory, String operationName, CancellationToken cancellationToken)
at Azure.Security.KeyVault.Secrets.SecretClient.<>c__DisplayClass15_0.<GetPropertiesOfSecrets>b__0(String nextLink)
at Azure.Core.PageResponseEnumerator.<>c__DisplayClass0_0`1.<CreateEnumerable>b__0(String continuationToken, Nullable`1 pageSizeHint)
at Azure.Core.PageResponseEnumerator.FuncPageable`1.AsPages(String continuationToken, Nullable`1 pageSizeHint)+MoveNext()
at Azure.Pageable`1.GetEnumerator()+MoveNext()
at Azure.Extensions.AspNetCore.Configuration.Secrets.AzureKeyVaultConfigurationProvider.Load()
at Microsoft.Extensions.Configuration.ConfigurationRoot..ctor(IList`1 providers)
at Microsoft.Extensions.Configuration.ConfigurationBuilder.Build()
at GdprOptInDataProcessing.Program.GetIConfiguration() in /src/GdprOptInDataProcessing/Program.cs:line 107
at GdprOptInDataProcessing.Program.GetIConfiguration()
at GdprOptInDataProcessing.Program.CreateServices() in /src/GdprOptInDataProcessing/Program.cs:line 33
at GdprOptInDataProcessing.Program.Main(String[] args) in /src/GdprOptInDataProcessing/Program.cs:line 21
at GdprOptInDataProcessing.Program.<Main>(String[] args)

Expected behavior [What you expected to happen.]
The permissions to continue to work and keyvault authenicates fine
Actual behavior [What actually happened.]
The jobs start failing with a forbidden error
Additional context
Creating of the jobs was via Portal. Project is deployed to azure registry via Azure Devops
Related issue I logged ages ago, but since the I am no longer using out of date Identity packages. but the problem persists
I also tried adding a retry logic around the code to delay it 10,20 then 40 seconds before attepting the keyvault connection but it all fails.
https://github.com/microsoft/azure-container-apps/issues/1124

Hi. Yes this problem was solved internally for me as you mentioned.
To add some more info. I didn't believe I was creating a container apps with the same name but I was due to using a Azure devops Pipeline task that I thought was used to deploy to the container job but was instead deploying (and creating if not existing) a container app. As I had given it the same name as my job to use, I ended up with a container app and job with identical name and the bug in Azure was causing the identity problem.
So its a easy work around while this azure bug is fixed.
Thanks


"Missing argument for option: attachments" when following CLI docs to pass empty string argument

Following the CLI docs from here: https://www.mustangproject.org/commandline/#verbose
The CLI doesn't allow me to pass an empty string ("") to the -attachments option.
It must've been working in the past, because issue #276 got closed.
The full command I've used is:
java -Xmx1G -jar Mustang-CLI-2.15.0.jar --action combine -source .\testfile-in.pdf -source-xml .\CII_example1.xml -out testfile-out.pdf -version 2 -profile e -format zf -attachments ""
Output:
Missing argument for option: attachments

I've just found the solution by myself.
There's an undocumented switch:
https://github.com/ZUGFeRD/mustangproject/blob/dc10907406a62db25012f6634d689dc5ef8dbee6/Mustang-CLI/src/main/java/org/mustangproject/commandline/Main.java#L74
So the updated and working command for my example would be:
java -Xmx1G -jar Mustang-CLI-2.15.0.jar --action combine -source .\testfile-in.pdf -source-xml .\CII_example1.xml -out testfile-out.pdf -version 2 -profile e -format zf --no-additional-attachments
Maybe you could add the switch to the docs as well?


ENH: Replace BSpline GetSupportSize() by static constexpr SupportSize

Replaced the GetSupportSize() member function of
BSplineInterpolationWeightFunction by a static constexpr data member,
SupportSize.
Allows using this size at compile-time.
Follow-up to pull request https://github.com/InsightSoftwareConsortium/ITK/pull/2709
commit 34f3db8d8ad0ba848cbbfee071edf327e09f6a96
"ENH: Replace GetNumberOfWeights() by static constexpr NumberOfWeights"

Thanks for your feedback and approval of this PR, @dzenanz and @hjmjohnson !


Java 2.1: Byte Code

Description 📜
Add audio, documentation, and video regarding the Bytecode.

Domain of Contribution 📊

[x] Java

Location of File to be added
The files should be added inside the Bytecode folder which is inside the Fundamental present in the  Java main folder.  The documentation file can be in the .md/.py/.ipynb format. Audio should be in .mp3 format and to be submitted through a Google drive link. Video can be in any format and should be submitted through a Google Drive link.
Note:

You are required to comment with \assign CONTENT_TYPE, so that other content types can be created at the same time.
Failing to comment in the above manner will lead to the removal of assignment from the issue even if the bot assigns.
You are required to do a PR within 7 days otherwise you will be unassigned and others will be assigned.
Issues will be assigned on a first come first serve basis.

/assign

/assign Document

\assign Document

\assign documentation

\assign Document

@AbhinandanAdhikari  go with the Documentation

/assign Audio

\assign Audio

@Binita-tech go with the audio

@Binita-tech pls go with one issue at a time

Ok

\assign Video

Slot for audio is empty. Documentation will be done by @Amrita-Mukherjee and video will done @Pranav120602.

Slot for audio is empty. Documentation will be done by @Amrita-Mukherjee and video will done @Pranav120602.

@AkMo3 I've been assigned for documentation

Slot for audio is empty. Documentation will be done by @Amrita-Mukherjee and video will done @Pranav120602.

@AkMo3 I've been assigned for documentation

Yeah, my bad. I meant for you only. @AbhinandanAdhikari has been appointed for documentation.

\assign audio

\assign document

/assign documentation


Removal of Password Authentication

Issue/Feature Description
Unable to push the file into GitHub repository even when the password was manually entered by the user.

Why this issue to fixed / feature is needed(give scenarios or use cases)
To successfully add on the file within to the repository we'll have to fix the issue.
How to reproduce, in case of a bug
To create a General-Token in performing the push successfully.
Other Notes /  Environment Information: (Please give the env information, log link or any useful information for this issue)
To copy the token when once created the token successfully.
To create token go with the following link: https://github.com/settings/tokens

Ma'am issue created @kalaiselvikks76


chore(deps): update

:tada: This PR is included in version 1.22.0 :tada:
The release is available on:

npm package (@latest dist-tag)
GitHub release

Your semantic-release bot :package::rocket:


"//" as comments ?

Currently we only support "/*" as comment.
Should we also support the format of "//" ?

Any update on this. In my brief experience using reason, this is by far the most frustrating limitation of the syntax.

No update yet. We can probably just print any comment as a single line comment automatically that:

Contains no newline: So /* this */ would be printed as // this.
Is guaranteed by the formatter to not have any content after it on the same line. For example, if we know that the following could never happen:

/*we have to make sure  */ this could never happen

I believe this can be closed due to the merging of #2254

Indeed, this is implemented and released


Not really an issue

I have three pisces p100 running your script, on 2 of them , witch are working ok, I get rx data and witness , but on one of them, witch is working bad, I get only witness . Do you know why I can't receive any rx data on it? Can it have a problem?
Thank you in advance!

Hi
Sorry for the late reply.
This behaviour seems to indicate some bad element at the RF side. Witnesseses reach your hotspot at higher RSSI and using the more favorable SF12BW125 datarate, this is why they are more easily received.
Check the cables, in particular the SMA to N-Female pigtail inside the P100, which is usually overbent and sometimes damaged. I have found that most of the P100 have this issue, resulting in packet loss ranging from 5% to 50%. I sometimes replace it with the bluetooth cable (which is longer), but this will render your bluetooth unusable until you order another cable (the LoRa pigtail is too short).
I hope it helps.
Kind regards


Noise output from proto use --include-global

What version?
0.39.7
Which command?
proto use --include-global
What happened?
This is the output from the command when all tools are already up to date. There's a lot going on, despite nothing actually happening.
━━━━       Installing 8 tools: bun, deno, go, node, npm, pnpm, rust, yarn
Node.js 22.6.0 has already been installed at ~/.proto/tools/node/22.6.0
━━━━━      Installing 8 tools: bun, deno, go, node, npm, pnpm, rust, yarn
pnpm 9.7.0 has already been installed at ~/.proto/tools/pnpm/9.7.0
Deno 1.45.5 has already been installed at ~/.proto/tools/deno/1.45.5
Bun 1.1.22 has already been installed at ~/.proto/tools/bun/1.1.22
━━━━━━     Installing 8 tools: bun, deno, go, node, npm, pnpm, rust, yarn
Rust 1.80.1 has already been installed at ~/.rustup/toolchains/1.80.1-aarch64-apple-darwin
━          Installing 8 tools: bun, deno, go, node, npm, pnpm, rust, yarn
Go 1.22.6 has already been installed at ~/.proto/tools/go/1.22.6
━━━━━      Installing 8 tools: bun, deno, go, node, npm, pnpm, rust, yarn
npm 10.8.2 has already been installed at ~/.proto/tools/npm/10.8.2
━━━━━━━━   Installing 8 tools: bun, deno, go, node, npm, pnpm, rust, yarn
yarn 4.4.0 has already been installed at ~/.proto/tools/yarn/4.4.0
Successfully installed tools!

Some of the issues with this output:

Progress bars for tools that don't get updated
Installing 8 tools: bun, deno, go, node, npm, pnpm, rust, yarn gets repeated 6 times
Successfully installed tools! message, despite nothing being installed

I would've preferred a simple All tools are already up to date or 8 tools are already up to date. This noise is extra annoying when there actually are upgrades, because it gets hard to tell which tools have been upgraded among all the messages.
I hope this feedback is helpful in cleaning up the messaging here! :)
Trace logs?
No response
Operating system?
MacOS
Architecture?
arm64

The progress bar is causing most of these issues, especially the duplicated messages. I'll just remove it for now.
As for the "Successfully installed tools!" message, all tools are installed in separate threads, so the main thread doesn't know what was actually installed or not.

Ah ok. I see why upgrades run in separate threads, but could the initial version check run on the main thread so it can report something like upgrading 4 out of 8 tools?
Anyway, as you say fixing the progress bar will be a big improvement on its own, so if that's fixed I'm happy!

This will be a lot prettier in the next version.

Fixed in 0.40