aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/rules/objc/XcodeProvider.java
Commit message (Collapse)AuthorAge
* Don't keep packages in the default repository around after loading.Gravatar Brian Silverman2016-03-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, this would get thrown when referring to the same package from both the main and default repositories: java.lang.IllegalArgumentException: Multiple entries with same key: tools/cpp=/home/brian/971-Robot-Code and tools/cpp=/home/brian/971-Robot-Code at com.google.common.collect.ImmutableMap.checkNoConflict(ImmutableMap.java:136) at com.google.common.collect.RegularImmutableMap.checkNoConflictInKeyBucket(RegularImmutableMap.java:98) at com.google.common.collect.RegularImmutableMap.fromEntryArray(RegularImmutableMap.java:84) at com.google.common.collect.ImmutableMap$Builder.build(ImmutableMap.java:295) at com.google.devtools.build.lib.buildtool.BuildTool.transformPackageRoots(BuildTool.java:301) at com.google.devtools.build.lib.buildtool.BuildTool.buildTargets(BuildTool.java:209) at com.google.devtools.build.lib.buildtool.BuildTool.processRequest(BuildTool.java:334) at com.google.devtools.build.lib.runtime.commands.TestCommand.doTest(TestCommand.java:119) at com.google.devtools.build.lib.runtime.commands.TestCommand.exec(TestCommand.java:104) at com.google.devtools.build.lib.runtime.BlazeCommandDispatcher.exec(BlazeCommandDispatcher.java:371) at com.google.devtools.build.lib.runtime.BlazeRuntime$3.exec(BlazeRuntime.java:1016) at com.google.devtools.build.lib.server.RPCService.executeRequest(RPCService.java:65) at com.google.devtools.build.lib.server.RPCServer.executeRequest(RPCServer.java:434) at com.google.devtools.build.lib.server.RPCServer.serve(RPCServer.java:229) at com.google.devtools.build.lib.runtime.BlazeRuntime.serverMain(BlazeRuntime.java:975) at com.google.devtools.build.lib.runtime.BlazeRuntime.main(BlazeRuntime.java:772) at com.google.devtools.build.lib.bazel.BazelMain.main(BazelMain.java:55) And this would get thrown for any packages in the main repository loaded from other repositories: java.lang.RuntimeException: Unrecoverable error while evaluating node 'PACKAGE:@//tools/build_rules/go/toolchain' (requested by nodes ) at com.google.devtools.build.skyframe.ParallelEvaluator$Evaluate.run(ParallelEvaluator.java:982) at com.google.devtools.build.lib.concurrent.AbstractQueueVisitor$WrappedRunnable.run(AbstractQueueVisitor.java:499) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.IllegalArgumentException: Invalid BUILD file name for package '@//tools/build_rules/go/toolchain': /home/brian/bazel/tools/build_rules/go/toolchain/BUILD at com.google.devtools.build.lib.packages.Package.finishInit(Package.java:299) at com.google.devtools.build.lib.packages.Package$Builder.finishBuild(Package.java:1308) at com.google.devtools.build.lib.skyframe.PackageFunction.compute(PackageFunction.java:501) at com.google.devtools.build.skyframe.ParallelEvaluator$Evaluate.run(ParallelEvaluator.java:933) ... 4 more Sponsor's comment: note the abundance of new Label.resolveRepositoryRelative() calls. They are ugly, but it's only making existing ugliness explicit. Yes, we should fix it, especially in the implementation of configurable attributes. Refs #940 -- Change-Id: I8bd7f7b00bec58a7157507595421bc50c81b404c Reviewed-on: https://bazel-review.googlesource.com/#/c/2591 MOS_MIGRATED_REVID=117429733
* Make xcode project generation generate correct filenames for external reposGravatar Kristina Chodorow2016-02-11
| | | | | -- MOS_MIGRATED_REVID=114350802
* Use Bazel Preconditions variant which avoids varargs array creationGravatar Mark Schaller2015-12-10
| | | | | | | Reduces garbage. -- MOS_MIGRATED_REVID=109914243
* Propagate additional sources of an ios application's extension.Gravatar Chris Parsons2015-11-10
| | | | | | | Without this change, an output xcode project artifact refers to the additional sources of its dependency projects, but does not necessarily mark these sources as action inputs. -- MOS_MIGRATED_REVID=107428634
* Create AppleConfiguration and AppleCommandLineOptions, and move a few items ↵Gravatar Chris Parsons2015-11-10
| | | | | | | | | | | of configuration over to the apple package. This moves a small number of configuration items over. Future changes will mostly likely follow to move yet more items. The split here is necessary as it is not only objc-related rules which require information about apple platforms and configuration -- cc rules will need this information as well to pass appropriate args to clang. -- MOS_MIGRATED_REVID=107396114
* Rationalize copyright headersGravatar Damien Martin-Guillerez2015-09-25
| | | | | | | | | | | The headers were modified with `find . -type f -exec 'sed' '-Ei' 's|Copyright 201([45]) Google|Copyright 201\1 The Bazel Authors|' '{}' ';'` And manual edit for not Google owned copyright. Because of the nature of ijar, I did not modified the header of file owned by Alan Donovan. The list of authors were extracted from the git log. It is missing older Google contributors that can be added on-demand. -- MOS_MIGRATED_REVID=103938715
* Move Label from the lib.syntax to the lib.cmdline package so that:Gravatar Lukacs Berki2015-09-21
| | | | | | | | | | - Label parsing can be simplified - lib.syntax is only contains the code for Skylark and is reasonably independent from the problem domain of building things This change is mostly only changes to imports declarations. The rest is reversing the dependency between :cmdline and :syntax and moving a tiny amount of code between Printer and FilesetEntry and the addition of SkylarkPrintableValue that I couldn't be bothered to separate out into its own change. -- MOS_MIGRATED_REVID=103527877
* Add additional sources of test host to xctest targetsGravatar Chris Parsons2015-09-21
| | | | | | | Also improve test coverage for inclusion of dummy source file in xcode project targets -- MOS_MIGRATED_REVID=103384049
* When generating Xcode projects, remove -I options from copts and instead add ↵Gravatar Rumou Duan2015-09-14
| | | | | | | the -I include paths as non-propagated header search paths. If the paths are relative, prepend $(WORKSPACE_ROOT) to them. -- MOS_MIGRATED_REVID=102994196
* Change the order of header search paths in XcodeProvider to link order, ↵Gravatar Rumou Duan2015-09-01
| | | | | | | which is in line with the order of similar fields in ObjcProvider used for Bazel build. -- MOS_MIGRATED_REVID=101979394
* Link to tools/objc/dummy.c from output directory to allow xcodeproj to ↵Gravatar Chris Parsons2015-08-26
| | | | | | | resolve the file even while outside a workspace which contains it -- MOS_MIGRATED_REVID=101462428
* RELNOTES: Allow private headers in the srcs attribute. Add a warning if a ↵Gravatar Googler2015-08-20
| | | | | | | | | file is in both srcs and hdrs. This uses a very restrictive definition of private headers. They may only imported by sources in the same target and other private headers. They are not transitively available to dependers, even indirectly, though this may change in the future. -- MOS_MIGRATED_REVID=101028706
* Deduplicate XCode target names in the dependencies propagated to XCode projects.Gravatar Michael Thvedt2015-08-20
| | | | | -- MOS_MIGRATED_REVID=100924958
* Experimental support for ios_framework rulesGravatar Dmitry Shevchenko2015-08-12
| | | | | | | | | | | | | | | | | | | | | * Allows for building and linking to a framework in ios_application * Currently only works for single arch builds * Xcode generation produces correct target type, but is mostly untested The implementation is very similar to that of objc_framework: 1) Build the ios_framework_binary as a dynamic library (-dynamiclib) 2) Symlink the library and public headers to a staging location, inside of "X.framework" bundle. Where X is the name under ios_framework_binary#framework_name 3) Pass the bundle content to ObjcCommon.addFrameworkImports, reusing the core of objc_framework rule implementation. This results in correctly set -F/-framework flags and allows clients to use the framework in a way they would use any SDK/3rd-party framework. It's allowed to import headers via #import <X/X.h> call. 4) Copy the binary and all resources into final application bundle under Frameworks/X.framework 5) Sign the app and nested frameworks -- MOS_MIGRATED_REVID=100397239
* For each objc target, export all xcdatamodels in the transitive closure to ↵Gravatar Rumou Duan2015-06-30
| | | | | | | XcodeGen. -- MOS_MIGRATED_REVID=97145288
* Xcode project file support for structured resources defined in attribute ↵Gravatar Rumou Duan2015-06-19
| | | | | | | "structured_resources" on ObjC rules. -- MOS_MIGRATED_REVID=96332700
* Rollback of commit 162d5b276e1539b1acc44afcd4a4ccadcf99023a.Gravatar Googler2015-06-15
| | | | | | | | | | | | | | | | | *** Reason for rollback *** Breaks targets that have the same .m file in both srcs and hdrs. *** Original change description *** Allow private header files in the srcs attribute of objc_* rules. This uses CppModuleMap and CppModuleMapAction to generate clang module maps for the target and its transitive dependencies. clang enforces private header usage through these maps. Right now module maps are interpreted but modules aren't enabled. RELNOTES: Allow private header files in the srcs attribute of objc_* rules. -- MOS_MIGRATED_REVID=95916531
* Allow private header files in the srcs attribute of objc_* rules.Gravatar Googler2015-06-15
| | | | | | | | | This uses CppModuleMap and CppModuleMapAction to generate clang module maps for the target and its transitive dependencies. clang enforces private header usage through these maps. Right now module maps are interpreted but modules aren't enabled. RELNOTES: Allow private header files in the srcs attribute of objc_* rules. -- MOS_MIGRATED_REVID=95844137
* Simplify bundle merging information.Gravatar Peter Schmitt2015-05-19
| | | | | | | | Moves the bundle merging action logic into BundleSupport and eliminates the need for InfoplistMerging.java. -- MOS_MIGRATED_REVID=93926774
* RELNOTES: Fix linking order for Bazel-generated XCode projects.Gravatar Googler2015-05-11
| | | | | -- MOS_MIGRATED_REVID=93170106
* Ensure extension's bundle minimum OS version is at least 8.0.Gravatar Peter Schmitt2015-04-28
| | | | | | | | | | | | | | | | | This is required because Apple does not accept extensions whose plist has a minimum OS value lower than 8.0, or whose code is compiled at less than 8.0, even if it is included in an application that is compiled for, and marked compatible with, a lower OS version. Note that I didn't make this an attribute for now as there are no use cases for setting the value to anything but 8.0. If we ever need to make this user-configurable, a value can easily be set. Second submission attempt with small additional logic to distinguish xcode projects across configurations. -- MOS_MIGRATED_REVID=92267493
* Remove bundling and application specific build settings from generated ↵Gravatar Googler2015-04-28
| | | | | | | companion Xcode library target. -- MOS_MIGRATED_REVID=92198656
* Description redacted.Gravatar Peter Schmitt2015-04-24
| | | | | -- MOS_MIGRATED_REVID=91881146
* Ensure extension's bundle minimum OS version is at least 8.0.Gravatar Peter Schmitt2015-04-23
| | | | | | | | | | | | | | This is required because Apple does not accept extensions whose plist has a minimum OS value lower than 8.0, or whose code is compiled at less than 8.0, even if it is included in an application that is compiled for, and marked compatible with, a lower OS version. Note that I didn't make this an attribute for now as there are no use cases for setting the value to anything but 8.0. If we ever need to make this user-configurable, a value can easily be set. -- MOS_MIGRATED_REVID=91831415
* Description redacted.Gravatar Googler2015-04-21
| | | | | -- MOS_MIGRATED_REVID=91617486
* RELNOTES:Observe "non_propagated_deps" on objc rules in generated XCode ↵Gravatar Googler2015-04-16
| | | | | | | project files. -- MOS_MIGRATED_REVID=91300378
* Always define OS_IOS in iOS builds.Gravatar Peter Schmitt2015-03-31
| | | | | | | RELNOTES: Always define OS_IOS in iOS builds. -- MOS_MIGRATED_REVID=89969990
* Compile objc resources when bundling, not at each target.Gravatar Peter Schmitt2015-03-24
| | | | | | | | | | | | | | | | | | | | | | This change moves the resource compilation actions from each declaring target to the bundle in which they're stored. This bundle is (mostly, see below) the only thing that cares about the compiled resources. As a result, we avoid compiling each resource many times when in a multi-architecture context. Note that as a result of this change rules other than ios_test do no longer add the compiled datamodels and storyboards to files to build. There (should?) be no need for them anyhow. Also, Xcode targets will now no longer contain the transitive closure of datamodels, only their own. Note that in the case where the input resource is produced by a genrule the resource compilation still happens for each architecture but we ignore the results for all but one of the architectures to avoid bundling conflicts. There are also some more validation checks and nicer error messages for users when they specify illegal strings resources. -- MOS_MIGRATED_REVID=89404405
* Only use a single copy of a nested bundle with ios_multi_cpus.Gravatar Peter Schmitt2015-03-23
| | | | | | | | | | | | We generate a nested bundle for each architecture specified in ios_multi_cpus which would cause any artifacts generated by these rules (such as info plists or compiled resource files) to clash in the final application bundle (where the bundle directory only exists once). For now just pick one architecture at random to store the bundle in - unfortunately we still generate the bundle for all architectures. -- MOS_MIGRATED_REVID=89152199
* Remove common java code between objc tools and rules.Gravatar Peter Schmitt2015-03-23
| | | | | | | | | | As we are releasing the tools somewhat independently of the rules these utility dependencies make life a lot harder. I'm sad about losing some of the enum type-safety but being able to treat the code independently is more than worth it. -- MOS_MIGRATED_REVID=89137624
* Pass pre-processed label to Xcodegen so it can be used as an Xcode target ↵Gravatar Matthew DeVore2015-03-23
| | | | | | | | | name without any extra work in Xcodegen. Use this label to determ ine the *correct* built library. -- MOS_MIGRATED_REVID=89135635
* Prevent clashing xcode targets for multiple architectures.Gravatar Peter Schmitt2015-03-20
| | | | | | | | | | | Without this change we create a xcode target for each combination (target, architecture) which causes the xcode project generation to blow up: Xcode transparently handles architectures. Eventually we want to match Xcode's behaviour but for now we export just a single architecture's xcode targets which should allow developers to work in xcode as before while preserving multi-architecture compilation for IPAs in blaze. -- MOS_MIGRATED_REVID=88973190
* Xcode project files: Add dependencies on ios_extension from objc_binary ↵Gravatar Matthew DeVore2015-02-23
| | | | | | | | | correctly. ios_extension is a direct dependency of the objc_binary, but none of the transitive dependencies should be added to the build phases, since this would cause the symbols of the linked objc_binary to contain everything the ios_extension has, which we don't want. -- MOS_MIGRATED_REVID=86920610
* Add a dummy source file to the Xcode targets for ios_extensions to make ↵Gravatar Matthew DeVore2015-02-22
| | | | | | | Xcode happy. -- MOS_MIGRATED_REVID=86910779
* Implement ios_extension rule. See IosExtensionRule.java for information on ↵Gravatar Matthew DeVore2015-02-20
| | | | | | | | | how app extensions are built and how they differ from application bundles. RELNOTES: Support ios_extension and ios_extension_binary rules for creating iOS app extensions. -- MOS_MIGRATED_REVID=86788086
* Update from Google.Gravatar Han-Wen Nienhuys2015-02-25
-- MOE_MIGRATED_REVID=85702957