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

makeModule(...) -> module(...) 로 바뀌었는데 자동화에 적용이 안되어있어요 #218

Closed
HongSJae opened this issue Jan 15, 2024 · 2 comments · Fixed by #222
Closed

Comments

@HongSJae
Copy link

Describe

make module

...

This module has a 'Interface' Target? (y\n, default = n) : y
This module has a 'Testing' Target? (y\n, default = n) : y
This module has a 'UnitTests' Target? (y\n, default = n) : n
This module has a 'UITests' Target? (y\n, default = n) : y
This module has a 'Demo' Target? (y\n, default = n) : n

Bash에서 위 명령어를 사용해 예시로 SignupFeature을 만들 때 아래와 같은 코드가 생성됩니다.

import ProjectDescription
import ProjectDescriptionHelpers
import DependencyPlugin

let project = Project.makeModule(
    name: ModulePaths.Feature.SignupFeature.rawValue,
    product: .staticLibrary,
    targets: [
	.interface(module: .feature(.SignupFeature)),
	.implements(module: .feature(.SignupFeature), dependencies: [
		.feature(target: .SignupFeature, type: .interface)
	]),
	.testing(module: .feature(.SignupFeature), dependencies: 
		.feature(target: .SignupFeature, type: .interface)
	)
    ],
    internalDependencies: []
)

makeModule(...)module(...)로 수정하고 파라미터 자동화를 수정해야 할 것 같네요..

예시)

import ProjectDescription
import ProjectDescriptionHelpers
import DependencyPlugin

let project = Project.module(
    name: ModulePaths.Feature.SignupFeature.rawValue,
    targets: [
	.interface(module: .feature(.SignupFeature)),
		.implements(module: .feature(.SignupFeature), dependencies: [
		.feature(target: .SignupFeature, type: .interface)
	]),
	.testing(module: .feature(.SignupFeature), dependencies: [
		.feature(target: .SignupFeature, type: .interface)
	])
    ]
)

Additional

제가 make Module를 하여 project 파일을 만들면 탭이 비정상적으로 길어지는데..

func tab(_ count: Int) -> String {
    var tabString = ""
    for _ in 0..<count {
        tabString += "\t\t"
    }
    return tabString
}

->

func tab(_ count: Int) -> String {
    var tabString = ""
    for _ in 0..<count {
        tabString += "\t"
    }
    return tabString
}

로 바꾸는 방법은 어떨까요?

@HongSJae
Copy link
Author

추가로 Testing 자동화에 괄호가 없어서 수상해요

.testing(module: .feature(.BaseFeature), dependencies: 
			.feature(target: .BaseFeature, type: .interface)
),

@uuuunseo
Copy link
Contributor

피드백 정말 감사합니다!!
현재 해당 문제가 발생한 걸 확인하고 수정 중입니다! 팀원들과 소통 후 빠른 시일내에 반영하겠습니다:)

@uuuunseo uuuunseo linked a pull request Feb 12, 2024 that will close this issue
uuuunseo added a commit that referenced this issue Feb 12, 2024
uuuunseo added a commit that referenced this issue Feb 12, 2024
…utomation

🔀 :: [#218] 모듈 생성 자동화 스크립트 수정
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 a pull request may close this issue.

2 participants