Skip to content

More accurate computation of compile job output paths #67

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

Merged
merged 1 commit into from
Feb 13, 2020

Conversation

owenv
Copy link
Contributor

@owenv owenv commented Feb 4, 2020

With this change, we're down to 6 interpreter and 3 stdlib lit tests still failing. I'm not all that happy with this solution, it feels kind of fragile. I haven't come up with anything better though so I thought I'd put this up in case anyone had a better solution in mind.

@owenv owenv force-pushed the compile-base-outputs branch 2 times, most recently from 518e2fd to 2a11514 Compare February 5, 2020 00:31
@owenv
Copy link
Contributor Author

owenv commented Feb 5, 2020

There's probably still room for improvement here, but with a few updates we now can pass all but one stdlib test

@cltnschlosser
Copy link
Contributor

I don't fully understand the OutputFileMap, but could we add this to there instead of injecting a different path? or would that not work?

@owenv
Copy link
Contributor Author

owenv commented Feb 5, 2020

@cltnschlosser it might work, I need to look into it some more. There are some tricky cases where the inputs that produce the specified outputs might be temporary files.

@owenv owenv changed the title Handle base output paths correctly when -o and -c are passed together [WIP]Handle base output paths correctly when -o and -c are passed together Feb 6, 2020
@owenv
Copy link
Contributor Author

owenv commented Feb 6, 2020

Marking this as WIP until I have time to look over it again and come up with a better design

@owenv owenv force-pushed the compile-base-outputs branch from 2a11514 to 99b3786 Compare February 12, 2020 03:40
@owenv owenv changed the title [WIP]Handle base output paths correctly when -o and -c are passed together More accurate computation of compile job output paths Feb 12, 2020
@owenv owenv force-pushed the compile-base-outputs branch from 99b3786 to c4afe55 Compare February 12, 2020 03:52
@owenv
Copy link
Contributor Author

owenv commented Feb 12, 2020

I decided to move the output path computation down into compile job planning. This now aims to reproduce the logic from the cpp getOutputFilename, excluding anything that isn't applicable to compile jobs. This makes it significantly easier to understand, but could lead to duplication throughout the other jobs in the future. Using a top-of-tree swift checkout, it passes the entire stdlib suite, and all but 5 interpreter tests. I'm not sure my isTopLevel check is 100% correct though.

@owenv owenv requested a review from DougGregor February 12, 2020 03:53
Copy link
Member

@DougGregor DougGregor left a comment

Choose a reason for hiding this comment

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

Nice cleanup, thank you!

@DougGregor
Copy link
Member

@swift-ci please test

@DougGregor DougGregor merged commit ce4ee20 into swiftlang:master Feb 13, 2020
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.

3 participants