Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-24180] Hyperloop: iOS - Swift files referencing each other break metabase generation

GitHub Issuen/a
TypeBug
PriorityHigh
StatusOpen
ResolutionUnresolved
Affected Version/sHyperloop 2.0.0
Fix Version/sn/a
ComponentsHyperloop, iOS
Labelsn/a
ReporterJan Vennemann
AssigneeUnknown
Created2016-11-29T16:35:13.000+0000
Updated2018-02-28T19:55:56.000+0000

Description

*Steps to reproduce the behavior* 1. Create a new Hyperloop enabled project 2. Add the following sample code under src: MySwift.swift
import Foundation

public class MySwift {
	init() {
		let test = Test()
	}
}

Test.swift
import Foundation

public class Test {
    public func sayHello() {
        print("Hello")
    }
}
3. Add a appc.js to the project root with the following content:
module.exports = {
	type: 'app',
	group: 'titanium',
	hyperloop: {
		ios: {
			thirdparty: {
				'MyFramework': {
					source: ['src'],
					header: 'src',
					resource: 'src'
				}
			}
		}
	}
};
4. Add var MySwift = require('MyFramework/MySwift'); to app/controller/index.js to trigger Hyperloop's metabase generation 5. Build the project with appc run -p ios *Actual behavior* Metabase generation fails with the following error:
[INFO]  Generating metabase for swift MyFramework /Users/jvennemann/Development/appc/hyperloop-examples/src/MySwift.swift
[ERROR] /Users/jvennemann/Development/appc/hyperloop-examples/src/MySwift.swift:5:14: error: use of unresolved identifier 'Test'
*Expected behavior* Metabase generation succeeds and one can reference types from other Swift source files.

Comments

No comments

JSON Source