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

.net - compileToBinary fix #4353

Merged
merged 6 commits into from
Nov 28, 2022
Merged

.net - compileToBinary fix #4353

merged 6 commits into from
Nov 28, 2022

Conversation

partouf
Copy link
Contributor

@partouf partouf commented Nov 27, 2022

Removes shared variable that would conflict with simultaneous compilations

Also ups pids max because of an issue I was hitting locally

@partouf partouf changed the title write projectfile in doCompilation() .net - compileToBinary fix Nov 27, 2022
@kasperk81
Copy link
Contributor

we shouldn't force Main method for compile mode. generic method (M2 in example below) somehow require Main

image

adding empty Main fix it but it is definitely a bug with generic method
image

basically <OutputType>Exe</OutputType> in project file for execution mode only.

@hez2010
Copy link
Contributor

hez2010 commented Nov 27, 2022

we shouldn't force Main method for compile mode. generic method (M2 in example below) somehow require Main

image

adding empty Main fix it but it is definitely a bug with generic method
image

basically <OutputType>Exe</OutputType> in project file for execution mode only.

For execution, you must provide an entry point. If you don't want to provide an entry point, you can choose not to compile to binary.

@kasperk81
Copy link
Contributor

For execution, you must provide an entry point. If you don't want to provide an entry point, you can choose not to compile to binary.

that's my point, i'm not using execution

@kasperk81
Copy link
Contributor

https://godbolt.org/z/9deeWGfGc there is no execution. output window is for compile, not execution and yet it is throwing CS5001

@hez2010
Copy link
Contributor

hez2010 commented Nov 27, 2022

https://godbolt.org/z/9deeWGfGc there is no execution. output window is for compile, not execution and yet it is throwing CS5001

That's weird. We should have set the OutputType to Library when compileToBinary is not checked.

@partouf
Copy link
Contributor Author

partouf commented Nov 27, 2022

https://godbolt.org/z/9deeWGfGc there is no execution. output window is for compile, not execution and yet it is throwing CS5001

That's weird. We should have set the OutputType to Library when compileToBinary is not checked.

that's because in live without this fix, the state is shared and the compileToBinary setting is never reset to false anymore

@hez2010
Copy link
Contributor

hez2010 commented Nov 28, 2022

Thanks for the fix. Looks good to me.

Copy link
Member

@mattgodbolt mattgodbolt left a comment

Choose a reason for hiding this comment

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

Thanks mate!

etc/nsjail/execute.cfg Outdated Show resolved Hide resolved
Copy link
Member

@mattgodbolt mattgodbolt left a comment

Choose a reason for hiding this comment

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

Can you fix the lint issues too please

@partouf partouf merged commit 4f1bbcf into main Nov 28, 2022
@partouf partouf deleted the fixdotnetbinaryglobalstate branch November 28, 2022 22:13
Comment on lines +152 to +153
const sdkBaseDir = path.join(path.dirname(compiler), 'sdk');
const sdkVersions = await fs.readdir(sdkBaseDir);
Copy link
Contributor

Choose a reason for hiding this comment

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

unused

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ah. right, merge conflict things

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It's a manual thing we have to do, push some buttons, test on testing environment, make fixes, deploy to live, etc. So somewhere between an hour and 2 weeks depending on the admins schedules.

@hez2010
Copy link
Contributor

hez2010 commented Nov 28, 2022

I guess we can just skip running crossgen2 if we are in execution-only mode?

@partouf
Copy link
Contributor Author

partouf commented Nov 28, 2022

I guess we can just skip running crossgen2 if we are in execution-only mode?

Probably. You'll need to copy the runCompiler function, name it something else and call it from buildExecutable

@partouf
Copy link
Contributor Author

partouf commented Nov 29, 2022

this is now live

@kasperk81
Copy link
Contributor

with yesterday's container, it seems. latest one is https://github.com/compiler-explorer/compiler-workflows/actions/runs/3569737898

@partouf
Copy link
Contributor Author

partouf commented Nov 29, 2022

installation happens at a later point during the night, in about 5 hours

@kasperk81
Copy link
Contributor

in about 5 hours

it wasn't updated. still using the one from day before yesterday

@partouf
Copy link
Contributor Author

partouf commented Nov 30, 2022

in about 5 hours

it wasn't updated. still using the one from day before yesterday

Latest is now installed. There were a couple things wrong with the build and install script

mattgodbolt pushed a commit that referenced this pull request Dec 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants