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

Expose Target's sources attribute as a Snapshot to Tasks #5762

Closed
illicitonion opened this issue Apr 27, 2018 · 6 comments
Closed

Expose Target's sources attribute as a Snapshot to Tasks #5762

illicitonion opened this issue Apr 27, 2018 · 6 comments
Assignees

Comments

@illicitonion
Copy link
Contributor

I don't know how we want to do this, but it's about to become necessary - @stuhood any thoughts? :)

@illicitonion
Copy link
Contributor Author

Other things to be thinking about when working this out:

  1. How classpath entries provided by options should become Snapshots (e.g. compiler-classpath)
  2. How classpath entries provided by jar_library targets should become Snapshots
  3. How classpath entries provided by compiler output should become Snapshots

@stuhood
Copy link
Member

stuhood commented May 7, 2018

I don't know how we want to do this, but it's about to become necessary - @stuhood any thoughts? :)

There are a few moving pieces here, but many of them are implemented the way that they are because of the v1 engine's glob expansion, which is now gone.

In the middle are EagerFilesetWithSpec and LazyFilesetWithSpec, which are the actual implementations of Target.sources (and other fields created by Target.create_sources_field).

The vast majority of sources fields should be created via _eager_fileset_with_spec during target hydration in the engine... this is then passed to the sources argument of targets at construction time.

LazyFilesetWithSpec should be almost unused at this point... it is created def create_fileset_with_spec via some convoluted wrapping of some python glob expansion functions, and then called via (Files|Globs|RGlobs).create_fileset_with_spec, etc. But since we've deleted the v1 file expansion code, step one is probably to delete LazyFilesetWithSpec and then replace create_fileset_with_spec callsites with a helper to use scheduler.product_request(Snapshot, [PathGlobs]) (or a batch form of the same).

There would likely be a huge amount of dead code after this.


With that out of the way, you could rename EagerFilesetWithSpec to something more useful, and then give it a required Snapshot parameter.

@stuhood
Copy link
Member

stuhood commented May 7, 2018

Other things to be thinking about when working this out:

As to these, I suspect that some of doing these "the right way" will be blocked by #5788... in the short term, synchronously capturing Snapshots via a product call would be ok though... #5788 will be on the way this quarter certainly.

@stuhood stuhood changed the title Expose Target's sources attribute as a a PathGlobs or Snapshot to Tasks Expose Target's sources attribute as a Snapshot to Tasks May 21, 2018
@stuhood stuhood added the quelea label May 23, 2018
@illicitonion illicitonion self-assigned this May 23, 2018
@illicitonion
Copy link
Contributor Author

Started looking at this, some progress in #5858 and #5856 but these cause failing tests, which is blocked on #5611 which @stuhood and I are looking at with high priority

@stuhood
Copy link
Member

stuhood commented Jun 5, 2018

Late breaking link: this relates more to #4535 than I realized.

@illicitonion
Copy link
Contributor Author

This was fixed by #5994

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

No branches or pull requests

2 participants