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

Compiler does not take all inputs into account for determinism #17121

Open
jcouv opened this issue Feb 13, 2017 · 15 comments
Open

Compiler does not take all inputs into account for determinism #17121

jcouv opened this issue Feb 13, 2017 · 15 comments
Assignees
Labels
Area-Compilers Blocked Concept-Determinism The issue involves our ability to support determinism in binaries and PDBs created at build time. Documentation
Milestone

Comments

@jcouv
Copy link
Member

jcouv commented Feb 13, 2017

In discussion about editorconfig today, a number of scenarios were mentioned that we know or suspect are not properly accounted for in determinism:

  • additional files
  • rulesets
  • included rulesets from ruleset

FYI @jaredpar

@jcouv jcouv added Area-Compilers Concept-Determinism The issue involves our ability to support determinism in binaries and PDBs created at build time. labels Feb 13, 2017
@gafter
Copy link
Member

gafter commented Feb 14, 2017

I don't know what you mean by "not properly accounted for". Determinism means that identical inputs result in identical outputs. It does not mean that different inputs result in different outputs. The latter isn't possible (and isn't a goal of the determinism effort), as the output is frequently smaller than the input.

@gafter gafter added the Need More Info The issue needs more information to proceed. label Feb 14, 2017
@jcouv
Copy link
Member Author

jcouv commented Feb 14, 2017

My understanding is there is a hash embedded in the output file properties, which is computed from various inputs (including content hash for source files). But not all inputs.
I'll let @jaredpar confirm or clarify.

@jaredpar
Copy link
Member

The other goal of determinism though is content enabled caching. In order to have proper content enabled caching the compiler at minimum needs to have a full documentation of what is part of the compiler input set. I do not believe these items are properly labeled as part of that set.

@jaredpar jaredpar removed the Need More Info The issue needs more information to proceed. label Feb 14, 2017
@gafter
Copy link
Member

gafter commented Feb 14, 2017

I understand now.

@gafter
Copy link
Member

gafter commented Feb 17, 2017

What about the set of analyzer assemblies?

@gafter
Copy link
Member

gafter commented Feb 17, 2017

@jaredpar What is the form of the documentation required to address this issue? Is there an output of the compiler that is the list of things the compilation depended on? Or it is some document somewhere checked into some repository with an English description of the set of inputs that affect the compilation?

@jaredpar
Copy link
Member

@gafter
Copy link
Member

gafter commented Feb 17, 2017

Rulesets are explicitly documented, as are "(Binary) contents of all files explicitly passed to the compiler, directly or indirectly"

@gafter gafter added this to the 2.1 milestone Feb 20, 2017
@gafter gafter self-assigned this Feb 20, 2017
gafter added a commit to gafter/roslyn that referenced this issue Feb 20, 2017
@gafter gafter added 4 - In Review A fix for the issue is submitted for review. and removed 2 - Ready labels Feb 20, 2017
@gafter
Copy link
Member

gafter commented Feb 21, 2017

Reopening until editorconfig fallout is clear and documented.

@gafter gafter reopened this Feb 21, 2017
@gafter gafter closed this as completed in e50beb0 Feb 21, 2017
@gafter gafter added Blocked and removed 4 - In Review A fix for the issue is submitted for review. labels Feb 21, 2017
@gafter gafter reopened this Feb 27, 2017
@jaredpar jaredpar added this to the 15.3 milestone Mar 9, 2017
@gafter
Copy link
Member

gafter commented Mar 18, 2017

@jaredpar What remains to be done to address this issue?

@gafter
Copy link
Member

gafter commented May 9, 2017

@jaredpar As far as I know the editorconfig file is not used by the compiler. It may be used by analyzers, as may other files, but we have an umbrella documentation for files used by analyzers.

So I think this work item is complete. Please reopen if you have something specific you believe should be added to the docs.

@gafter gafter closed this as completed May 9, 2017
@gafter gafter removed the Blocked label May 9, 2017
@jaredpar jaredpar reopened this May 10, 2017
@jaredpar
Copy link
Member

It's an active feature and the design isn't fully closed out.

@gafter
Copy link
Member

gafter commented May 10, 2017

@jaredpar This issue says that "Compiler does not take all inputs into account for determinism". As far as I know that is not true; it does take all inputs into account. This is not an open design issue, it is a bug report.

If there is another feature that impacts determinism under active development, please open a specific issue against the team doing that development to make sure the team takes determinism into account. As it stands, this issue is too generic and is not actionable.

@gafter gafter assigned jaredpar and unassigned gafter May 10, 2017
@gafter gafter added the Blocked label May 10, 2017
@jaredpar jaredpar modified the milestones: 15.3, 15.later Aug 28, 2017
@gafter gafter modified the milestones: 15.6, 15.8 May 18, 2018
@jinujoseph jinujoseph modified the milestones: 15.8, 16.0 Nov 23, 2018
@jinujoseph jinujoseph modified the milestones: 16.0, 16.3 Jun 9, 2019
@jasonmalinowski
Copy link
Member

@agocke I see this item is in the IDE tracking project for .editorconfig -- do we know if this bug is even still meaningful at this point or should I close it out?

@agocke
Copy link
Member

agocke commented Jul 3, 2019

@jasonmalinowski This bug is still valid, since I'm not sure I updated determinism to account for editorconfig files, but is not IDE-related.

@jcouv jcouv modified the milestones: 16.3, Compiler.Next Jul 16, 2019
@jaredpar jaredpar modified the milestones: Compiler.Next, Backlog Sep 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Compilers Blocked Concept-Determinism The issue involves our ability to support determinism in binaries and PDBs created at build time. Documentation
Projects
None yet
Development

No branches or pull requests

6 participants