Skip to content

Add Redox OS compilation to Travis using Redoxer#1208

Merged
coolreader18 merged 10 commits into
masterfrom
coolreader18/redox-ci
Aug 12, 2019
Merged

Add Redox OS compilation to Travis using Redoxer#1208
coolreader18 merged 10 commits into
masterfrom
coolreader18/redox-ci

Conversation

@coolreader18
Copy link
Copy Markdown
Member

@coolreader18 coolreader18 force-pushed the coolreader18/redox-ci branch from 5f8be00 to 04a8839 Compare August 9, 2019 15:22
@coolreader18 coolreader18 requested a review from palaviv August 9, 2019 16:47
@coolreader18 coolreader18 force-pushed the coolreader18/redox-ci branch from 7245643 to f7246a3 Compare August 9, 2019 17:40
Comment thread Cargo.toml
# Uncommment when you want to compile/check with redoxer
# [patch.crates-io]
[patch.crates-io]
# REDOX START, Uncommment when you want to compile/check with redoxer
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Maybe a patch file on Cargo.toml in the redox folder might be a better option here?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

If it were a patch file, it would only work with the same number of lines; it would break if we were to add more lines e.g. dependencies above where it's switching the lines.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would prefer doing a target dependent dependency like in the vm Cargo.toml. Some thing like
[target.'cfg(not(target_os = "redox"))'.dependencies] and [target.'cfg(target_os = "redox")'.dependencies]

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I tried doing target.cfg().patch syntax at first, but it didn't work for some reason.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why do we need to use the target.cfg().patch and not target.cfg().dependencies?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This might be a nice option, so we can use feature flags, or even let cargo figure out the os, and use the target_os flag.

@windelbouwman
Copy link
Copy Markdown
Contributor

I'm not too sure about this change. We should try to keep the pull request builds light weight. Is there an option to run this check once in a while? We could use cron or something to run this now and then? Also, is there a redox capable CI-service?

@coolreader18
Copy link
Copy Markdown
Member Author

The funny thing is that the redox job is actually shorter than both the rust test and Python test jobs; also, I was thinking of opening a merge request to redox to add RustPython to their cookbook, and if we do do that it'd be good to make sure that master always compiles for redox. Although maybe we could base it off release, in which case I could just run this test if we're on release.

Copy link
Copy Markdown
Contributor

@palaviv palaviv left a comment

Choose a reason for hiding this comment

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

Looks good

Comment thread Cargo.toml
# Uncommment when you want to compile/check with redoxer
# [patch.crates-io]
[patch.crates-io]
# REDOX START, Uncommment when you want to compile/check with redoxer
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I would prefer doing a target dependent dependency like in the vm Cargo.toml. Some thing like
[target.'cfg(not(target_os = "redox"))'.dependencies] and [target.'cfg(target_os = "redox")'.dependencies]

@palaviv
Copy link
Copy Markdown
Contributor

palaviv commented Aug 10, 2019

I'm not too sure about this change. We should try to keep the pull request builds light weight. Is there an option to run this check once in a while? We could use cron or something to run this now and then? Also, is there a redox capable CI-service?

I agree with @windelbouwman. I don't think at this stage we should support another target. In case we decide to add another target to the CI I would suggest macos

@coolreader18
Copy link
Copy Markdown
Member Author

I did set it to only run as a cron job or when on the release branch, does that seem better?

@palaviv
Copy link
Copy Markdown
Contributor

palaviv commented Aug 10, 2019

I did set it to only run as a cron job or when on the release branch, does that seem better?

I am not sure this will be any different from the current status. Changes that break redox will enter the code and once in a while you will see the cron job fails and fix them...
As for running the job when doing a release. What would we do in case it fails?

@coolreader18
Copy link
Copy Markdown
Member Author

It would at least signal that something is broken. Also, as I mentioned before, it really does finish quickly, so if we wanted to do it every run we could; I could also change redoxer build redoxer check.

Also, re: failing on release, we could commit a fix to master through a quick PR when the merge master into release build fails, and then merge to release.

@palaviv
Copy link
Copy Markdown
Contributor

palaviv commented Aug 11, 2019

I would suggest doing only the cron job and remove the release check. I think a release should depend only on supported targets.

@coolreader18
Copy link
Copy Markdown
Member Author

Maybe I could manage a redox-release branch or something that could be the source for the redox recipe.

Comment thread vm/src/stdlib/socket.rs
fn extend_module_platform_specific(vm: &VirtualMachine, module: PyObjectRef) -> PyObjectRef {
let ctx = &vm.ctx;

#[cfg(not(target_os = "redox"))]
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

You might consider modifying line 443 somewhat more above. This function will then be enabled for not unix or redox.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

No, that's intentional. I'm assuming in the future that there will be unix-only parts of the module that are compatible with redox, so once those are added they can all stay in the unix extend_module_platform_specific fn like for os.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Okay.

@coolreader18 coolreader18 merged commit 96bd5a6 into master Aug 12, 2019
@coolreader18 coolreader18 deleted the coolreader18/redox-ci branch August 12, 2019 14:55
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