no such file or directory - swiftdoc swiftmodule swiftsourceinfo swiftdoc - xcode

I have a project where I write XCUITests. I would like to place the accessibility IDs in a separate framework along with other things so that they can be read in the project and in the tests.
MyProject
- MyProject.xcworkscapce
- MyFramework
- MyApp
-MyApp (main-target)
-MyAppUITests (uiTest-target)
Loading MyFramework in the project is no problem. To make it visible for the UITests I import MyFramework into the UITests. The class and the static variables (Acc-Ids) are public. The completion also recognises everything, no errors are shown in the code, I can also navigate to the variables. The app works.
Now when I run the test, I get 4 error messages, which unfortunately tell me nothing at all:
/Users/john.doe/Library/Developer/Xcode/DerivedData/ALIS-ffdwrkfpekfzrggbfmnsazmrxelm/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyAppUITests.build/Objects-normal/x86_64/MyAppUITests.abi.json
/Users/john.doe/Library/Developer/Xcode/DerivedData/ALIS-ffdwrkfpekfzrggbfmnsazmrxelm/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyAppUITests.build/Objects-normal/x86_64/MyAppUITests.abi.json: No such file or directory
/Users/john.doe/Library/Developer/Xcode/DerivedData/ALIS-ffdwrkfpekfzrggbfmnsazmrxelm/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyAppUITests.build/Objects-normal/x86_64/MyAppUITests.swiftdoc
/Users/john.doe/Library/Developer/Xcode/DerivedData/ALIS-ffdwrkfpekfzrggbfmnsazmrxelm/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyAppUITests.build/Objects-normal/x86_64/MyAppUITests.swiftdoc: No such file or directory
/Users/john.doe/Library/Developer/Xcode/DerivedData/ALIS-ffdwrkfpekfzrggbfmnsazmrxelm/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyAppUITests.build/Objects-normal/x86_64/MyAppUITests.swiftmodule /Users/john.doe/Library/Developer/Xcode/DerivedData/ALIS-ffdwrkfpekfzrggbfmnsazmrxelm/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyAppUITests.build/Objects-normal/x86_64/MyAppUITests.swiftmodule: No such file or directory
/Users/john.doe/Library/Developer/Xcode/DerivedData/ALIS-ffdwrkfpekfzrggbfmnsazmrxelm/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyAppUITests.build/Objects-normal/x86_64/MyAppUITests.swiftsourceinfo /Users/john.doe/Library/Developer/Xcode/DerivedData/ALIS-ffdwrkfpekfzrggbfmnsazmrxelm/Build/Intermediates.noindex/MyApp.build/Debug-iphonesimulator/MyAppUITests.build/Objects-normal/x86_64/MyAppUITests.swiftsourceinfo: No such file or directory
What I tried:
clean project
delete derived data
the framework is in Copy Bundle Resources?
copy bundle resources: is there something red
This is a special "no such file or directory" error that some people seem to get.
Any help appreciated.

Related

Build a go project with a different go.mod file [duplicate]

This question already has an answer here:
How to use an alternate go.mod file for local development?
(1 answer)
Closed 10 months ago.
I would like to know how can I build a go project using a different go.mod file. Suppose I want to build project A inside project B module using project B go.mod file without copying the files around. That means I want to use dependencies in Project B to build Project A.
Manual option
"Module files" refers to both go.mod and go.sum
Rename or move project A's module files to some temporary names / location
Copy project B's module files into project A
Edit the newly copied go.mod file in project A, and change the module name:
module github.com/x/b changes to module github.com/x/a
Build whatever you need to build in project A
Delete the active module files in project A
Restore the proper module files for project A that you renamed or moved in step 1
These steps could be automated with a shell script or batch file if you need to do it often.
With build command
Using the go help build command, we can see the build flag -modfile
-modfile file
in module aware mode, read (and possibly write) an alternate go.mod
file instead of the one in the module root directory. A file named
"go.mod" must still be present in order to determine the module root
directory, but it is not accessed. When -modfile is specified, an
alternate go.sum file is also used: its path is derived from the
-modfile flag by trimming the ".mod" extension and appending ".sum".
Using this, we can directly use an alternative set of module files to build things in project A.
First, the flag description indicates that it may write to the go.mod file, so it's probably still a good idea to create a copy of project B's module files to do this.
Second, using project B's module file is going to be a problem if: 1. project A and project B have a different module name declared in their module file, and 2. packages in project A import other packages in project A. The module name determines what the import path of packages in the module will be, so changing it could break imports.
So the best practice should still be to:
Make a copy of project B's module files
Change the module name in the copy
Then you can run the build command like this to build in project A:
go build -modfile path/to/projectb/go.mod
First, make a folder b somewhere. Then make a folder a inside b. Then make
b/b.go:
package b
const Something = 1
Then make b/a/a.go:
package a
import "b"
func something() int {
return b.Something
}
Then go back to b folder, and do go mod init b. Done.

Get File Names in Resource directory

I have a Xamarin.Forms GetFiles.IOS project that has a "Resources" directory that's part of the project. I have placed 25 files into the Resources Directory. I now want to be able to go to the resource directory and get all the file names. I created some code to read the files in the directory but I'm getting a DirectoryNotFoundException. Here's the code I'm using.
String dir = Directory.GetCurrentDirectory();
var filePath = Path.Combine(dir,"Resources");
String[] files = Directory.GetFiles(filePath);
I just can't seem to get the path correct!
Thank you for helping me.
There are two things necessary to have the files be copied into the app folder:
They need to be set with Build Action Content with Copy to Output Directory Copy Always in the Properties window.
They must be in a different custom folder than Resources.
Number 2. is because Resources is a special reserved directory name and even if you put some content files in it, it is never copied in the app bundle's folder. You can check for yourself, if you put the files in a folder Test, your code will work as intended.

Playframework: Custom template path

I was wondering if it is possible to override/add to the template paths for Playframework? For instance, the default templates are looked under views folder and are compiled automatically. These templates are further reachable directly using a URL without any additional config.
---app
|-controllers
|-models
|-templates //How do I compile templates under this folder?
|-views
What I would like to know is if it is possible to add a custom path in addition to the views folder that is also compiled with the build process. Alternatively, is it possible to block certain templates to be not reachable by direct URL ?
Thanks in advance!
Under the app directory, Play should automatically compile anything that looks like a Twirl template - that is, has a registered extension such as *.scala.html - regardless of what directory it's in. The views directory is just a convention, and compiling templates under an app/templates directory should already happen.
If you open an SBT prompt you can verify this by running the command:
show twirlCompileTemplates::sourceDirectories
Which should give you something like:
[info] my-project/compile:twirlCompileTemplates::sourceDirectories
[info] List(/home/me/my-project/app)
For adding a templates directory outside the app folder, you should be able to add something like the following in your build.sbt (for example, the directory extra_templates):
import play.twirl.sbt.Import.TwirlKeys._
sourceDirectories in (Compile, compileTemplates) += file("extra_templates")

CLIPSJNI.SymbolValue cannot be cast to CLIPSJNI.MultifieldValue

I'm trying to run the example CLIPS GUI projects, both versions 0.2 and 0.3, however without success. Nothing special - I create a simple Eclipse project with the codes, using Debian 64bit and I always end up with the "CLIPSJNI.SymbolValue cannot be cast to CLIPSJNI.MultifieldValue" exception. I got the libCLIPSJNI.so in /usr/lib64. Any help or suggestions appreciated.
I think your issue is that either the rule or resource files are not being found in your projects. There are probably multiple (or better) ways to do this, but what I did was create a CLIPSJNI project to contain the CLIPSJNI.dll, CLIPSJNI.jar, and libCLIPSJNI.jnilib files and then a separate project for each of the demos. I placed the clp files at the root level of the demo project, the java code within the src directory and the resources folder within the src directory:
Animal
src
AnimalDemo.java
resources
AnimalResources.properties
.
.
.
animaldemo.clp
bcdemo.clp
I placed an archive zip of the projects at https://sourceforge.net/projects/clipsrules/files/CLIPS/Misc/: CLIPSJNI_0_3_Eclipse_projects_64Bit.zip

lobos.migrations not found in Maven-style project layout

I'm having trouble getting the lobos database migrations library for Clojure to play with the maven-clojure-plugin and Maven-style project structure. Lobos looks for database migrations in the lobos.migrations namespace. If I layout the project Leiningen style:
src/
lobos/
migrations.clj
lobos correctly finds lobos.migrations at run time, when run via lein. However, if I lay out the project Maven-style:
src/
main/
clojure/
lobos/
migrations.clj
and use the maven-clojure-plugin to run the same tests, lobos no longer finds lobos.migrations. I thought this was an issue with the clojure-maven-plugin, but I have the same issue (lobos not finding lobos.migrations) if I run via leon, setting the source paths in project.clj appropriately:
:source-paths ["src/main/clojure"]
If I move lobos/ back under src/ and add src/ as a source path:
:source-paths ["src" "src/main/clojure"]
then lobos correctly finds lobos.migrations again.
I would like to use a Maven-style project layout (and eventually the maven-clojure-plugin). How can I help lobos find lobos.migrations? Where have I gone wrong?
The lobos.migration/*src-directory* variable indicates the source root for finding source for the *migrations-namespace*. If lobos.migration/*reload-migrations* is true (the default), then lobos.migrations looks for the migrations namespace in this source directory. The default is src/, so it needs to be rebound to src/main/clojure in order to use a Maven-style directory structure.
One other notable issue: when running from a JAR (i.e. not from source), you must disable reloading of the migrations namespace as well:
(binding [lobos.migration/*reload-migrations* false]
;; run migration
)
You need to change the dynamic variable lobos.migration/*migrations-namespace*. This is documented here: https://github.com/budu/lobos#migrations.

Resources