Skip to content

build: restructure demo-app in favor of bazel #13965

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
Nov 15, 2018

Conversation

devversion
Copy link
Member

@devversion devversion commented Nov 3, 2018

Restructures the demo-app by no longer mixing up the demo-app name.

Currently the demo-app consists of two parts:

  • The demo-app
  • And the accessibility demos

As you can tell above, this is pretty much confusing because it's
technically just consisting of:

  • Accessibility demos
  • Library demos

This change cleans up the naming and makes sure that the modules are
structured in a best-practice way.

It's odd to have the DemoAppModule (not the root module) that
includes all library demos as a folder next to the actual demo
components.

This makes it extremely hard to convert the demo-app to Bazel because
we cannot target all .ts files through glob because it only matches
files inside of the same folder (or Bazel package).

In order to make it easy to run the demo-app with Bazel, and to just
clean it up, the folder structure should be as followed:

src/a11y-demo/
  | ...

src/dev-app/
  | ${DEMO_COMPONENT}
     | ...
     | BUILD.bazel
  | index.html
  | BUILD.bazel

@devversion devversion added pr: merge safe target: patch This PR is targeted for the next patch release labels Nov 3, 2018
@googlebot googlebot added the cla: yes PR author has agreed to Google's Contributor License Agreement label Nov 3, 2018
/src/demo-app/library-demos/tooltip/** @andrewseguin
/src/demo-app/library-demos/tree/** @jelbourn
/src/demo-app/library-demos/typography/** @crisbeto
/src/demo-app/library-demos/virtual-scroll/** @mmalerba
Copy link
Member Author

@devversion devversion Nov 3, 2018

Choose a reason for hiding this comment

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

@jelbourn We can chat more about why this is needed, in case you have any questions.

Moving forward, it's just unavoidable to somehow clean up our demo-app because right now, it's just feels unstructured, confusing, and not really Bazel compatible.

Also I'm not entirely sure about the name library-demos. I'm really open to other names or even another approach

Copy link
Member

@crisbeto crisbeto left a comment

Choose a reason for hiding this comment

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

Wouldn't it be better to completely split the a11y app from the demo app? That's what we're doing for the e2e app anyway. I don't think there's any reason for them to be together, apart from sparing us a main and app.module file. E.g.

src/
  | a11y/
     | ...
     | BUILD.bazel
     | index.html
  | demo-app/
     | ...
     | BUILD.bazel
     | index.html

@devversion
Copy link
Member Author

devversion commented Nov 4, 2018

That works too, and I considered it as well, but I just was afraid of re-adding another gulp process for the a11y app which should probably also include a watch mode, and build configuration.

I'm fine doing so though. We can also just have the a11y app as a plain Bazel package. While it would still take some time to actually serve it with Bazel, we could already build it like that without having more gulp tasks.

I suppose nobody is currently spending a lot of time on the a11y demos anyway.

@jelbourn
Copy link
Member

jelbourn commented Nov 5, 2018

Yeah, I would prefer splitting out the a11y app into a separate thing. Also, since it's such a big change anyway, renaming demo-app to dev-app.

@devversion
Copy link
Member Author

@jelbourn That's reasonable. Should we still add gulp tasks for the a11y stuff or rather just use Bazel for building (as mentioned above)?

@jelbourn
Copy link
Member

jelbourn commented Nov 5, 2018

We can just do the bazel setup for now since nobody is actively using the a11y demos at the moment

@devversion
Copy link
Member Author

Sounds good. That's what I was hoping. I will make the changes as soon as possible.

@ngbot
Copy link

ngbot bot commented Nov 8, 2018

Hi @devversion! This PR has merge conflicts due to recent upstream merges.
Please help to unblock it by resolving these conflicts. Thanks!

@devversion devversion force-pushed the build/build-demo-app-with-bazel branch 2 times, most recently from 74105fd to 624d19d Compare November 8, 2018 23:15
@devversion
Copy link
Member Author

@jelbourn I've updated the PR.

@devversion devversion force-pushed the build/build-demo-app-with-bazel branch from 624d19d to 9970c0a Compare November 10, 2018 10:13
@jelbourn
Copy link
Member

To clarify: the intent of this change is to make it possible to run the dev-app via bazel, which will be a follow-up, right?

@devversion
Copy link
Member Author

Exactly. There are a few more blockers for actually building the dev-app with Bazel, but I'm working on fixing those (e.g. angular/angular#27062)

This PR should be ready for review.

Copy link
Member

@jelbourn jelbourn left a comment

Choose a reason for hiding this comment

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

LGTM

@jelbourn jelbourn added pr: lgtm action: merge The PR is ready for merge by the caretaker labels Nov 14, 2018
Restructures the demo-app by no longer mixing up the `demo-app` name.

Currently the `demo-app` consists of two parts:

  * The demo-app
  * And the accessibility demos

As you can tell above, this is pretty much confusing because it's
technically just consisting of:

  * Accessibility demos
  * Library demos

This change cleans up the naming and makes sure that the modules are
structured in a best-practice way.

It's odd to have the `DemoAppModule` (*not the root module*) that
includes all library demos as a folder next to the actual demo
components.

This makes it extremely hard to convert the demo-app to Bazel because
we cannot target all `.ts` files through `glob` because it only matches
files inside of the same folder (or Bazel package).

In order to make it easy to run the demo-app with Bazel, and to just
clean it up, the folder structure should be as followed:

```
src/a11y-demo/
  | ...

src/dev-app/
  | ${DEMO_COMPONENT}
     | ...
     | BUILD.bazel
  | index.html
  | BUILD.bazel
```
@devversion devversion force-pushed the build/build-demo-app-with-bazel branch from 9970c0a to 128c985 Compare November 14, 2018 22:46
@devversion
Copy link
Member Author

@andrewseguin This one is rebased now as well.

It's just red because of the API guardian tests. Those should be fixed with #14144.

@jelbourn jelbourn merged commit 6d7f417 into angular:master Nov 15, 2018
josephperrott pushed a commit that referenced this pull request Nov 19, 2018
Restructures the demo-app by no longer mixing up the `demo-app` name.

Currently the `demo-app` consists of two parts:

  * The demo-app
  * And the accessibility demos

As you can tell above, this is pretty much confusing because it's
technically just consisting of:

  * Accessibility demos
  * Library demos

This change cleans up the naming and makes sure that the modules are
structured in a best-practice way.

It's odd to have the `DemoAppModule` (*not the root module*) that
includes all library demos as a folder next to the actual demo
components.

This makes it extremely hard to convert the demo-app to Bazel because
we cannot target all `.ts` files through `glob` because it only matches
files inside of the same folder (or Bazel package).

In order to make it easy to run the demo-app with Bazel, and to just
clean it up, the folder structure should be as followed:

```
src/a11y-demo/
  | ...

src/dev-app/
  | ${DEMO_COMPONENT}
     | ...
     | BUILD.bazel
  | index.html
  | BUILD.bazel
```
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Sep 10, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
action: merge The PR is ready for merge by the caretaker cla: yes PR author has agreed to Google's Contributor License Agreement target: patch This PR is targeted for the next patch release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants