Repository navigation
Commit 63978ed
committed
[flutter_tools] Resolve /packages/ requests below the package root
`_resolveDartFile` no longer builds a `package:` URI from the request
segments. It looks the package up by name and resolves the rest of the
path below that package's `packageUriRoot` with `resolveRequestPathUnder`,
like the other search roots. An absolute path after the package name
(`packages/<package>//<path>`) can no longer replace the package root, and
a request with nothing after the package name (`packages/foo.dart`) is
answered instead of throwing an `ArgumentError` out of `PackageConfig.resolve`.
This replaces the dot-segment check: containment handles dot segments here
the same way it does for the other roots.
`ReleaseAssetServer` now checks a root's allowed extensions against the
request path before resolving it, so regular asset requests skip
resolution for the source-map-only roots.1 parent b1149ce commit 63978ed
3 files changed
Lines changed: 41 additions & 20 deletions
File tree
- packages/flutter_tools
- lib/src/isolated
- test/general.shard/web
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
| 88 | + | |
88 | 89 | | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
89 | 97 | | |
90 | 98 | | |
91 | 99 | | |
| |||
97 | 105 | | |
98 | 106 | | |
99 | 107 | | |
100 | | - | |
101 | | - | |
102 | | - | |
103 | | - | |
104 | | - | |
105 | | - | |
106 | 108 | | |
107 | 109 | | |
108 | 110 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
744 | 744 | | |
745 | 745 | | |
746 | 746 | | |
747 | | - | |
748 | | - | |
749 | | - | |
750 | | - | |
751 | | - | |
752 | | - | |
753 | | - | |
754 | | - | |
755 | | - | |
756 | | - | |
757 | | - | |
758 | | - | |
759 | | - | |
760 | | - | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
| 751 | + | |
| 752 | + | |
| 753 | + | |
| 754 | + | |
| 755 | + | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
761 | 764 | | |
762 | 765 | | |
763 | 766 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
853 | 853 | | |
854 | 854 | | |
855 | 855 | | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
856 | 862 | | |
857 | 863 | | |
858 | 864 | | |
| |||
1752 | 1758 | | |
1753 | 1759 | | |
1754 | 1760 | | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
1755 | 1766 | | |
1756 | 1767 | | |
1757 | 1768 | | |
| |||
1777 | 1788 | | |
1778 | 1789 | | |
1779 | 1790 | | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
1780 | 1796 | | |
1781 | 1797 | | |
1782 | 1798 | | |
| |||
0 commit comments