Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Handle non boolean values for requires arc option #263

Merged

Conversation

britzl
Copy link
Contributor

@britzl britzl commented Mar 15, 2023

This PR also includes a fix for missing env in the context (this issue popped up after the big refactor @JCash did).

Fixes #262

@@ -10,8 +10,8 @@ build_artifact() {
echo "[build] Creating standalone extender server artifact at ${ARTIFACT_DIR}..."
rm -rf ${ARTIFACT_DIR}
mkdir -p ${ARTIFACT_DIR}
cp ${SERVER_DIR}/build/docker/extender-0.1.0.jar ${ARTIFACT_DIR}/extender.jar
Copy link
Contributor Author

Choose a reason for hiding this comment

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

We should use the path for standalone builds. The jar files are copied in build.gradle in task buildStandalone()

@@ -703,6 +703,9 @@ private void buildPods() throws IOException, InterruptedException, ExtenderExcep
// We use the same mechanism as when building the extension and create a
// manifest context for each pod
Map<String, Object> manifestContext = new HashMap<>();
manifestContext = ExtenderUtil.mergeContexts(manifestContext, this.platformConfig.context);
manifestContext = ExtenderUtil.mergeContexts(manifestContext, this.platformVariantConfig.context);
manifestContext = ExtenderUtil.mergeContexts(manifestContext, this.platformAppConfig.context);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I think we want the platformAppConfig as well?

Copy link
Contributor

@JCash JCash Mar 15, 2023

Choose a reason for hiding this comment

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

I suggest we use the already merged mergedAppContext from loadManifests().
You can make a copy of that and then override your variables below.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point! Done!

@@ -578,14 +588,20 @@ public ResolvedPods resolveDependencies(File jobDirectory, String platform) thro
throw new ExtenderException("Unsupported platform " + platform);
}

List<File> podFiles = ExtenderUtil.listFilesMatchingRecursive(jobDirectory, "Podfile");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Exit the service early if the job doesn't contain any Podfiles

@britzl britzl requested a review from JCash March 15, 2023 14:52
@@ -703,6 +703,9 @@ private void buildPods() throws IOException, InterruptedException, ExtenderExcep
// We use the same mechanism as when building the extension and create a
// manifest context for each pod
Map<String, Object> manifestContext = new HashMap<>();
manifestContext = ExtenderUtil.mergeContexts(manifestContext, this.platformConfig.context);
manifestContext = ExtenderUtil.mergeContexts(manifestContext, this.platformVariantConfig.context);
manifestContext = ExtenderUtil.mergeContexts(manifestContext, this.platformAppConfig.context);
Copy link
Contributor

@JCash JCash Mar 15, 2023

Choose a reason for hiding this comment

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

I suggest we use the already merged mergedAppContext from loadManifests().
You can make a copy of that and then override your variables below.

File armFrameworkDir = new File(frameworkDir, "ios-arm64_armv7");
if (armFrameworkDir.exists()) {
Path from = new File(armFrameworkDir, frameworkName + ".framework").toPath();
File arm64_armv7FrameworkDir = new File(frameworkDir, "ios-arm64_armv7");
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Make sure to look for multiple variations of folder names inside the frameworks

@britzl britzl requested a review from JCash March 16, 2023 08:27
@@ -618,7 +617,7 @@ public ResolvedPods resolveDependencies(File jobDirectory, String platform) thro
List<PodSpec> pods = installPods(workingDir);
copyPodFrameworks(pods, frameworksDir);

dumpDir(jobDirectory, 0);
// dumpDir(jobDirectory, 0);
Copy link
Contributor

Choose a reason for hiding this comment

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

There is a DM_KEEP_JOB_FOLDER for debugging.
I suggest we piggyback on that?

@britzl britzl merged commit 794de63 into dev Mar 16, 2023
@britzl britzl deleted the Issue-262-handle-non-boolean-values-for-requires-arc-option branch March 16, 2023 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Handle non-boolean values for requires_arc in Podspecs
2 participants